Skip to main content

Provide some tools in C++ development

Project description

README

Provide some tools in C++ development.

  • Extracted raw strings from the C++ code

The source code is here. The python package is here.

1. How to install

pip install cjtool

2. Command

A new command stringrep.exe is added after the installation.

  • The command stringrep is to replace the raw string to a pointer. For example
    auto m = py::module::import("test_cmake_build");
    // convert to the line below
    auto m = py::module::import(pStrTest_cmake_build);

    // the definiation of the string is as below
    constexpr char* pStrTest_cmake_build = "test_cmake_build";
  • Help message from the command stringrep is as below.
$ stringrep -h
usage: stringrep [-h] [-i] [-c] [-g] [-p PREFIX] file

positional arguments:
  file                  set the cpp file name

optional arguments:
  -h, --help            show this help message and exit
  -i, --inplace         replace the file in place (default: False)
  -c, --capitalize      capitalize the captured word, for example,
                        "tom" turns to "Tom" (default: False)
  -g, --generate        generate the header lines for the captured
                        strings (default: False)
  -p PREFIX, --prefix PREFIX
                        set the prefix for raw string (default: pStr)

How to build and upload

python -m build --sdist --wheel
twine upload dist/*

Test on local machine

python -m pip install --editable .

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cjtool-0.29.10.tar.gz (23.6 kB view details)

Uploaded Source

Built Distribution

cjtool-0.29.10-py3-none-any.whl (22.2 kB view details)

Uploaded Python 3

File details

Details for the file cjtool-0.29.10.tar.gz.

File metadata

  • Download URL: cjtool-0.29.10.tar.gz
  • Upload date:
  • Size: 23.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for cjtool-0.29.10.tar.gz
Algorithm Hash digest
SHA256 3fdd01c3edb6569032d39cd428c29a7f9981dcf20016c1bbd27433d5d3e500fa
MD5 5785347de6c420e7ad58af0b6754396d
BLAKE2b-256 ba9fdf3118a869113633d1083ef5490d4dd1d64fbda5cdb059e387180ea3df7a

See more details on using hashes here.

File details

Details for the file cjtool-0.29.10-py3-none-any.whl.

File metadata

  • Download URL: cjtool-0.29.10-py3-none-any.whl
  • Upload date:
  • Size: 22.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for cjtool-0.29.10-py3-none-any.whl
Algorithm Hash digest
SHA256 e71a845329f20e235bf4b3dba444dd21d3b101fa4f516ae250cc8f62fdf866c5
MD5 18c9166b7f2de1af24f906e72d2de549
BLAKE2b-256 08af5de4346eeeb89988456cabc1eb525928d93fb7dcf58798ffdc3733ef8d8c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page