Skip to content

Commit

Permalink
Add argument ranges and defaults to command line help text. (#74)
Browse files Browse the repository at this point in the history
* Add argument ranges and defaults to command line help text.

* Update cmdapp/src/main.rs

Co-authored-by: Viktor Szakats <[email protected]>

---------

Co-authored-by: Chris Tsang <[email protected]>
Co-authored-by: Viktor Szakats <[email protected]>
  • Loading branch information
3 people authored Mar 29, 2024
1 parent 74f2a04 commit 11769b0
Showing 1 changed file with 6 additions and 6 deletions.
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

0 comments on commit 11769b0

Please sign in to comment.