rdg

Crates.iordg
lib.rsrdg
version0.1.1
sourcesrc
created_at2021-08-29 01:02:40.740199
updated_at2021-10-18 17:48:32.411248
descriptionRandom data generator for the command line
homepagehttps://www.github.com/dsaxton/rdg
repositoryhttps://www.github.com/dsaxton/rdg
max_upload_size
id443608
size44,856
Daniel Saxton (dsaxton)

documentation

https://www.github.com/dsaxton/rdg

README

rdg

rdg 0.1
Generate random data at the command line

USAGE:
    rdg [OPTIONS] [SUBCOMMAND]

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
    -c, --count <integer>       Number of values to generate, default 1

SUBCOMMANDS:
    float     Random floating point numbers, default support [0, 1)
    int       Random integers, default support {0, 1}
    string    Random strings, default pattern [A-Za-z0-9]{10}
    word      Random words, requires a wordlist

rdg string

rdg-string
Random strings, default pattern [A-Za-z0-9]{10}

USAGE:
    rdg string [OPTIONS]

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
    -p, --pattern <string>    Pattern from which to sample, default [A-Za-z0-9]{10}

rdg word

rdg-word
Random words, requires a wordlist

USAGE:
    rdg word --file <path>

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
    -f, --file <path>    Wordlist used for sampling

rdg float

rdg-float
Random floating point numbers, default support [0, 1)

USAGE:
    rdg float [OPTIONS]

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
    -l, --lower <integer>    Lower bound (inclusive), default 0
    -u, --upper <integer>    Upper bound (exclusive), default 1

rdg int

rdg-int
Random integers, default support {0, 1}

USAGE:
    rdg int [OPTIONS]

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
    -l, --lower <integer>    Lower bound (inclusive), default 0
    -u, --upper <integer>    Upper bound (exclusive), default 2

Examples

$ rdg string --pattern "[A-Za-z0-9]{30}"
7XVzCeHizkRmoRUVC5ye5FYuBGMgm5
$ rdg --count 5 string --pattern "(bob|alice)[0-9]{3}@example.com"
alice929@example.com
bob431@example.com
alice974@example.com
alice391@example.com
alice545@example.com
$ rdg --count 5 word --file /usr/share/dict/american-english
gels
defended
shorts
forename
strengthen

Installation

cargo install rdg
Commit count: 0

cargo fmt