added uppercase variations for letter and alphanumeric generation symbols and removed --upper flag
This commit is contained in:
parent
32734cc91c
commit
0d9519c0db
3 changed files with 20 additions and 21 deletions
16
src/main.rs
16
src/main.rs
|
|
@ -40,26 +40,22 @@ struct Args {
|
|||
/// Decodes the following dollcode into an integer or text
|
||||
decode: Option<String>,
|
||||
|
||||
#[arg(short, long, default_value_t = false)]
|
||||
/// Specifies the encoding/decoding method as text, not as an integer
|
||||
text: bool,
|
||||
|
||||
#[arg(short, long)]
|
||||
/// Generates codes from a user-defined pattern (n = number; l = letter; a = alphanumeric)
|
||||
/// Generates codes from a user-defined pattern (n = number; l = letter; L = uppercase letter; a = alphanumeric; A = uppercase alphanumeric)
|
||||
generate: Option<String>,
|
||||
|
||||
#[arg(short, long, default_value_t = 1)]
|
||||
/// Specifies how many codes to generate
|
||||
count: usize,
|
||||
|
||||
#[arg(short, long, default_value_t = false)]
|
||||
/// Outputs generated letters as uppercase as opposed to lowercase
|
||||
upper: bool,
|
||||
|
||||
#[arg(long, default_value_t = false)]
|
||||
/// Will generate codes without encoding it into dollcode
|
||||
no_doll: bool,
|
||||
|
||||
#[arg(short, long, default_value_t = false)]
|
||||
/// Specifies the encoding/decoding method as text, not as an integer
|
||||
text: bool,
|
||||
|
||||
#[arg(long)]
|
||||
/// Display the license for dolltool
|
||||
license: bool,
|
||||
|
|
@ -75,7 +71,7 @@ fn main() {
|
|||
|
||||
if let Some(pattern) = args.generate {
|
||||
for _ in 0..args.count {
|
||||
let generated = generate_from_pattern(&pattern, args.upper);
|
||||
let generated = generate_from_pattern(&pattern);
|
||||
|
||||
if args.no_doll {
|
||||
println!("{}", generated);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue