Skip to content

Commit 11769b0

Browse files
StaticPHtyt2y3vszakats
authored
Add argument ranges and defaults to command line help text. (#74)
* Add argument ranges and defaults to command line help text. * Update cmdapp/src/main.rs Co-authored-by: Viktor Szakats <vszakats@users.noreply.github.com> --------- Co-authored-by: Chris Tsang <chris.2y3@outlook.com> Co-authored-by: Viktor Szakats <vszakats@users.noreply.github.com>
1 parent 74f2a04 commit 11769b0

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

cmdapp/src/main.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -68,45 +68,45 @@ pub fn config_from_args() -> (PathBuf, PathBuf, Config) {
6868
.long("filter_speckle")
6969
.short("f")
7070
.takes_value(true)
71-
.help("Discard patches smaller than X px in size"),
71+
.help("Discard patches smaller than X px in size. Accepts integer values within the range [0, 16](Default: 4)"),
7272
);
7373

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

8282
let app = app.arg(
8383
Arg::with_name("gradient_step")
8484
.long("gradient_step")
8585
.short("g")
8686
.takes_value(true)
87-
.help("Color difference between gradient layers"),
87+
.help("Color difference between gradient layers. Accepts integer values within the range [0, 255](Default: 16)"),
8888
);
8989

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

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

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

112112
let app = app.arg(

0 commit comments

Comments
 (0)