Skip to main content

shell wrapper for rstr (https://pypi.org/project/rstr/)

Project description

crstr

shell wrapper for rstr

installation

pip install crstr

usage

Simple usage

Gennerate a string of random length between 1-255

python -m crstr -c <--CHARSET-->
# e.g. 
# python -m crstr -c 'abcdefg'

Advanced usage

The extra options are actually pre-defined charsets

python -m crstr [-h] [--version] [-l strlength]
                [-B | -x | -X | -o | -b | -d | -a | -A | --lower-case | -w | --lower-word | --upper-word | -c charset]
                [-v | -p | -r regex]

  -l strlength, --length strlength
                        The length of the output string
  -B, --64, --base64    use base64 charset
  -x, --16, --hexadecimal
                        use lower-case hexadecimal charset
  -X, --16U, --HEXADECIMAL
                        use upper-case hexadecimal charset
  -o, --8, --octal      use octal charset
  -b, --2, --binary     use binary charset
  -d, --10, --decimal   use decimal charset
  -a, --alpha           use alphabet (both upper-case & lower-case) charset
  -A, --ALPHA           use upper-case alphabet charset
  --lower-case          use lower-case alphabet charset
  -w, --word            use word charset (alphabet & number)
  --lower-word          use lower-case word charset
  --upper-word          use upper-case word charset
  -c charset, --charset charset
                        use customized charset
  -v, --variable        generate python variable-name-allowed string
  -p, --package         generate common package-name-styled string
  -r regex, --regex regex
                        use customized regex

You can give this command an alias to simplify the it:
Add the following line to you bashrc

Usually ~/.bashrc (current user) or /etc/bashrc (global); if you use Git For Windows, it's /etc/bash.bashrc

alias crstr='python -m crstr'

Then you can use the command

crstr [options]

CAUTIONS

  1. An error would occur when attempting to generate a random string longer than 101 characters using regex, this is a known bug of rstr which is the core library of this program

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

crstr-1.0.0.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

crstr-1.0.0-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file crstr-1.0.0.tar.gz.

File metadata

  • Download URL: crstr-1.0.0.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.1

File hashes

Hashes for crstr-1.0.0.tar.gz
Algorithm Hash digest
SHA256 1d0937ca3c9bbedfd615ed79d9e8f2e3879e12c2a288c0c237ae78780bbe3ec5
MD5 fb6f0157d57fa55c0923a1be330443b8
BLAKE2b-256 34091db65c28753c52c7769d9cddb4386926f9e99dab24915a2160c0f17929ff

See more details on using hashes here.

File details

Details for the file crstr-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: crstr-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.1

File hashes

Hashes for crstr-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c21715f3b0ea9396b2296d6e113bb5e46a5af8718db4ed6021cd375b25ed2d52
MD5 1005922b04126e678a13329801b390ee
BLAKE2b-256 9835d80f9dfec1bdee929286d69f3056fc3d790f3ff7bc047476e6fead647e6f

See more details on using hashes here.

Supported by

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