Skip to content

Commit

Permalink
Update cli docs
Browse files Browse the repository at this point in the history
  • Loading branch information
becheran committed May 15, 2021
1 parent 24fb30c commit 0684deb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
| `--markup-types` | `-t` | List of markup types which shall be checked [possible values: md, html] |
| `--root-dir` | `-r` | All links to the file system starting with a slash on linux or backslash on windows will use another virtual root dir. For example the link in a file `[link](/dir/other/file.md)` checked with the cli arg `--root-dir /env/another/dir` will let *mlc* check the existence of `/env/another/dir/dir/other/file.md`. |
| `<directory>` | | Path to directory which shall be checked with all sub-dirs. Can also be a specific filename which shall be checked. |
| `--throttle` | | Number of milliseconds to wait in between web requests. Default is zero which means no throttling. Set this if you need to slow down the web request frequency to avoid `429 - Too Many Requests` responses. For example with `--throttle 15`, between each http check 15 ms will be waited. Note that this setting can slow down the link checker significantly. |
| `--throttle` | | Number of milliseconds to wait in between web requests to the same host. Default is zero which means no throttling. Set this if you need to slow down the web request frequency to avoid `429 - Too Many Requests` responses. For example with `--throttle 15`, between each http check to the same host, 15 ms will be waited. Note that this setting can slow down the link checker. |
6 changes: 3 additions & 3 deletions src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ pub fn parse_args() -> Config {
.arg(
Arg::with_name("match-file-extension")
.long("match-file-extension")
.help("Do check for the exact file extension when searching for a file.")
.help("Do check for the exact file extension when searching for a file")
.required(false),
)
.arg(
Expand Down Expand Up @@ -62,7 +62,7 @@ pub fn parse_args() -> Config {
.arg(
Arg::with_name("throttle")
.long("throttle")
.help("Wait between http request for a defined number of milliseconds.")
.help("Wait between http request to the same host for a defined number of milliseconds")
.required(false)
.takes_value(true),
)
Expand All @@ -83,7 +83,7 @@ pub fn parse_args() -> Config {
let throttle = match matches.value_of("throttle") {
Some(v) => v
.parse()
.expect("Integer expected. Throttle time in milliseconds."),
.expect("Integer expected. Throttle time in milliseconds"),
None => 0,
};

Expand Down

0 comments on commit 0684deb

Please sign in to comment.