From 875481b9a24d19c9bba0150b4c08c478145dc0dc Mon Sep 17 00:00:00 2001 From: Sunshine Date: Thu, 2 Apr 2020 03:04:21 -0400 Subject: [PATCH] update help dialog --- src/args.rs | 12 ++++++------ src/main.rs | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/args.rs b/src/args.rs index 75a429c..589e094 100644 --- a/src/args.rs +++ b/src/args.rs @@ -2,7 +2,7 @@ use clap::{App, Arg}; #[derive(Default)] pub struct AppArgs { - pub url_target: String, + pub target: String, pub no_css: bool, pub no_frames: bool, pub no_images: bool, @@ -26,11 +26,11 @@ impl AppArgs { .author(crate_authors!("\n")) .about(crate_description!()) .arg( - Arg::with_name("url") + Arg::with_name("target") .required(true) .takes_value(true) .index(1) - .help("URL to download"), + .help("URL or file path"), ) // .args_from_usage("-a, --include-audio 'Removes audio sources'") .args_from_usage("-c, --no-css 'Removes CSS'") @@ -47,9 +47,9 @@ impl AppArgs { .get_matches(); let mut app_args = AppArgs::default(); // Process the command - app_args.url_target = app - .value_of("url") - .expect("please set target url") + app_args.target = app + .value_of("target") + .expect("please set target") .to_string(); app_args.no_css = app.is_present("no-css"); app_args.no_frames = app.is_present("no-frames"); diff --git a/src/main.rs b/src/main.rs index 3e7a06b..b06b9c8 100644 --- a/src/main.rs +++ b/src/main.rs @@ -47,7 +47,7 @@ impl Output { fn main() { let app_args = AppArgs::get(); - let original_target: &str = &app_args.url_target; + let original_target: &str = &app_args.target; let target_url: &str; let base_url; let dom;