diff --git a/README.md b/README.md index 01c8e36..174c40b 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,25 @@ # kaprekar -Finding Kaprekar Constants using a recursive Kaprekar's Routine algorithm (brute force). + +Generates Kaprekar constants and series. + +## Usage + +```bash +Usage: kaprekar [OPTIONS] + +Options: + -n, --number Perform Kaprekar's routine on a number [default: 0] + -s, --start Perform Kaprekar's routine starting from a number [default: 0] + -e, --end Perform Kaprekar's routine up to a number [default: 0] + -a, --all Perform Kaprekar's routine on all numbers + -i, --iterations Number of iterations to perform [default: 20] + -t, --truncate Empty out non-series and non-constant vectors. + -o, --output Output the results to a csv file + -c, --cont Continue adding results to an existing csv file + -v, --verbose Print the Kaprekar routine + --symlink Create a symlink in /usr/local/bin + -h, --help Print help + -V, --version Print version +``` + +## diff --git a/src/main.rs b/src/main.rs index cae637f..9837fdc 100644 --- a/src/main.rs +++ b/src/main.rs @@ -14,19 +14,19 @@ use std::path::PathBuf; #[derive(Parser, Debug)] #[command(version, about, long_about = None)] struct Args { - /// Perform Kaprekar's routine on a number. + /// Perform Kaprekar's routine on a number #[arg(short, long, default_value = "0")] number: BigUint, - /// Perform Kaprekar's routine starting from a number. + /// Perform Kaprekar's routine starting from a number #[arg(short, long, default_value = "0")] start: BigUint, - /// Perform Kaprekar's routine up to a number. + /// Perform Kaprekar's routine up to a number #[arg(short, long, default_value = "0")] end: BigUint, - /// Perform Kaprekar's routine on all numbers. + /// Perform Kaprekar's routine on all numbers #[arg(short, long)] all: bool, @@ -34,8 +34,7 @@ struct Args { #[arg(short, long, default_value = "20")] iterations: u16, - /// Empty out non-series and non-constant vectors. - /// https://kaprekar.sourceforge.net/output/sample.php + /// Empty out non-series and non-constant vectors #[arg(short, long, default_value = "false")] truncate: bool, @@ -43,7 +42,7 @@ struct Args { #[arg(short, long)] output: Option, - /// Continue adding results to an existing csv file. + /// Continue adding results to an existing csv file #[arg(short, long)] cont: Option, @@ -51,7 +50,7 @@ struct Args { #[arg(short, long)] verbose: bool, - /// Create a symlink in /usr/local/bin. + /// Create a symlink in /usr/local/bin #[arg(long)] symlink: bool, }