Merge pull request #121 from snshn/improve-help

Update help dialog and README.md
This commit is contained in:
Sunshine 2020-02-20 08:07:01 -05:00 committed by GitHub
commit 8574b7899b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 15 deletions

View File

@ -37,13 +37,13 @@ If compared to saving websites with `wget -mpk`, this tool embeds all assets as
- `-c`: Ignore styles - `-c`: Ignore styles
- `-f`: Exclude iframes - `-f`: Exclude iframes
- `-i`: Remove images - `-i`: Remove images
- `-I`: Isolate document - `-I`: Isolate the document
- `-j`: Exclude JavaScript - `-j`: Exclude JavaScript
- `-k`: Accept invalid X.509 (TLS) certificates - `-k`: Accept invalid X.509 (TLS) certificates
- `-o`: Write output to file - `-o`: Write output to file
- `-s`: Silent mode - `-s`: Silent mode
- `-t`: Set custom network request timeout - `-t`: Set custom network request timeout
- `-u`: Specify custom User-Agent - `-u`: Provide own User-Agent
## HTTPS and HTTP proxies ## HTTPS and HTTP proxies
Please set `https_proxy`, `http_proxy`, and `no_proxy` environment variables. Please set `https_proxy`, `http_proxy`, and `no_proxy` environment variables.

View File

@ -17,7 +17,7 @@ pub struct AppArgs {
const DEFAULT_NETWORK_TIMEOUT: u64 = 120; const DEFAULT_NETWORK_TIMEOUT: u64 = 120;
const DEFAULT_USER_AGENT: &str = const DEFAULT_USER_AGENT: &str =
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:66.0) Gecko/20100101 Firefox/66.0"; "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:73.0) Gecko/20100101 Firefox/73.0";
impl AppArgs { impl AppArgs {
pub fn get() -> AppArgs { pub fn get() -> AppArgs {
@ -32,18 +32,18 @@ impl AppArgs {
.index(1) .index(1)
.help("URL to download"), .help("URL to download"),
) )
// .args_from_usage("-a, --include-audio 'Embed audio sources'") // .args_from_usage("-a, --include-audio 'Removes audio sources'")
.args_from_usage("-c, --no-css 'Ignore styles'") .args_from_usage("-c, --no-css 'Removes CSS'")
.args_from_usage("-f, --no-frames 'Exclude iframes'") .args_from_usage("-f, --no-frames 'Removes iframes'")
.args_from_usage("-i, --no-images 'Remove images'") .args_from_usage("-i, --no-images 'Removes images'")
.args_from_usage("-I, --isolate 'Cut off from the Internet'") .args_from_usage("-I, --isolate 'Cuts off document from the Internet'")
.args_from_usage("-j, --no-js 'Exclude JavaScript'") .args_from_usage("-j, --no-js 'Removes JavaScript'")
.args_from_usage("-k, --insecure 'Accept invalid X.509 (TLS) certificates'") .args_from_usage("-k, --insecure 'Allows invalid X.509 (TLS) certificates'")
.args_from_usage("-o, --output=[document.html] 'Write output to <file>'") .args_from_usage("-o, --output=[document.html] 'Writes output to <file>'")
.args_from_usage("-s, --silent 'Suppress verbosity'") .args_from_usage("-s, --silent 'Suppresses verbosity'")
.args_from_usage("-t, --timeout=[60] 'Specify custom timeout for network requests'") .args_from_usage("-t, --timeout=[60] 'Adjusts network request timeout'")
.args_from_usage("-u, --user-agent=[Iceweasel] 'Custom User-Agent string'") .args_from_usage("-u, --user-agent=[Firefox] 'Sets custom User-Agent string'")
// .args_from_usage("-v, --include-video 'Embed video sources'") // .args_from_usage("-v, --include-video 'Removes video sources'")
.get_matches(); .get_matches();
let mut app_args = AppArgs::default(); let mut app_args = AppArgs::default();
// Process the command // Process the command