mirror of
https://github.com/Skallwar/suckit.git
synced 2026-09-10 07:16:19 -04:00
Better help for CLI arguments (#56)
* args: Add 'help' section * benchmark: Add more data * Update src/args.rs Co-authored-by: Esteban Blanc <estblcsk@gmail.com> * Update src/args.rs Co-authored-by: Esteban Blanc <estblcsk@gmail.com> Co-authored-by: Esteban Blanc <estblcsk@gmail.com>
This commit is contained in:
parent
5233aecbc1
commit
6e93171185
14
src/args.rs
14
src/args.rs
|
|
@ -7,27 +7,27 @@ use url::Url;
|
|||
#[derive(Debug, StructOpt)]
|
||||
pub struct Args {
|
||||
///Entry point of scraping
|
||||
#[structopt(name = "url", parse(try_from_str))]
|
||||
#[structopt(name = "url", parse(try_from_str), help = "Entry point of the scraping")]
|
||||
pub origin: Url,
|
||||
|
||||
///Output directory
|
||||
#[structopt(short, long, parse(from_os_str))]
|
||||
#[structopt(short, long, parse(from_os_str), help = "Output directory")]
|
||||
pub output: Option<PathBuf>,
|
||||
|
||||
///Number of threads/workers
|
||||
#[structopt(short, long, default_value = "1")]
|
||||
#[structopt(short, long, default_value = "1", help = "Maximum number of threads to use concurrently")]
|
||||
pub jobs: usize,
|
||||
|
||||
///Max depth of scraping recursion
|
||||
#[structopt(short, long, default_value = "5")]
|
||||
#[structopt(short, long, default_value = "5", help = "Maximum recursion depth to reach when visiting")]
|
||||
pub depth: usize,
|
||||
|
||||
///Number of retries when downloading a page fails
|
||||
#[structopt(short, long, default_value = "20")]
|
||||
#[structopt(short, long, default_value = "20", help = "Maximum amount of retries on download failure")]
|
||||
pub tries: usize,
|
||||
|
||||
///Show logs
|
||||
#[structopt(short, long)]
|
||||
///Show all logs
|
||||
#[structopt(short, long, help = "Enable more information regarding the scraping process")]
|
||||
pub verbose: bool,
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,3 +7,6 @@
|
|||
94.61654992103577, 57.59067335128784, 24.995196104049683
|
||||
95.28456358909607, 46.86330976486206, 24.708560609817503
|
||||
77.68792352676391, 39.08626494407654, 19.765260219573975
|
||||
67.09948434829712, 34.11661868095398, 17.574066400527954
|
||||
68.2605634689331, 33.728125953674315, 17.433270835876463
|
||||
70.19220662117004, 41.964057207107544, 17.660782480239867
|
||||
|
|
|
|||
|
Loading…
Reference in a new issue