Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add argument ranges and defaults to command line help text. #74

Merged
merged 2 commits into from
Mar 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions cmdapp/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,45 +68,45 @@ pub fn config_from_args() -> (PathBuf, PathBuf, Config) {
.long("filter_speckle")
.short("f")
.takes_value(true)
.help("Discard patches smaller than X px in size"),
.help("Discard patches smaller than X px in size. Accepts integer values within the range [0, 16](Default: 4)"),
);

let app = app.arg(
Arg::with_name("color_precision")
.long("color_precision")
.short("p")
.takes_value(true)
.help("Number of significant bits to use in an RGB channel"),
.help("Number of significant bits to use in an RGB channel. Accepts integer values within the range [1, 8](Default: 6)"),
);

let app = app.arg(
Arg::with_name("gradient_step")
.long("gradient_step")
.short("g")
.takes_value(true)
.help("Color difference between gradient layers"),
.help("Color difference between gradient layers. Accepts integer values within the range [0, 255](Default: 16)"),
);

let app = app.arg(
Arg::with_name("corner_threshold")
.long("corner_threshold")
.short("c")
.takes_value(true)
.help("Minimum momentary angle (degree) to be considered a corner"),
.help("Minimum momentary angle (degree) to be considered a corner. Accepts integer values within the range [0, 180](Default: 60)"),
);

let app = app.arg(Arg::with_name("segment_length")
.long("segment_length")
.short("l")
.takes_value(true)
.help("Perform iterative subdivide smooth until all segments are shorter than this length"));
.help("Perform iterative subdivide smooth until all segments are shorter than this length. Accepts values within the range [3.5, 10](Default: 4.0)"));

let app = app.arg(
Arg::with_name("splice_threshold")
.long("splice_threshold")
.short("s")
.takes_value(true)
.help("Minimum angle displacement (degree) to splice a spline"),
.help("Minimum angle displacement (degree) to splice a spline. Accepts integer values within the range [0, 180](Default: 45)"),
);

let app = app.arg(
Expand Down
Loading