2020-11-24 06:58:50 +00:00
|
|
|
use clap::{App, AppSettings, Arg};
|
2020-05-16 08:09:44 +01:00
|
|
|
|
2020-11-24 06:58:50 +00:00
|
|
|
pub fn cli_init() -> App<'static, 'static> {
|
|
|
|
App::new("paperoni")
|
|
|
|
.settings(&[
|
|
|
|
AppSettings::ArgRequiredElseHelp,
|
|
|
|
AppSettings::UnifiedHelpMessage,
|
|
|
|
])
|
2021-01-24 14:54:33 +00:00
|
|
|
.version("0.2.2-alpha1")
|
2020-11-24 06:58:50 +00:00
|
|
|
.about(
|
|
|
|
"
|
|
|
|
Paperoni is an article downloader.
|
|
|
|
It takes a url and downloads the article content from it and saves it to an epub.
|
|
|
|
",
|
|
|
|
)
|
|
|
|
.arg(
|
|
|
|
Arg::with_name("urls")
|
|
|
|
.help("Urls of web articles")
|
|
|
|
.multiple(true),
|
|
|
|
)
|
2021-02-01 08:28:07 +00:00
|
|
|
.arg(
|
|
|
|
Arg::with_name("file")
|
|
|
|
.short("f")
|
|
|
|
.long("file")
|
|
|
|
.help("Input file containing links")
|
|
|
|
.takes_value(true),
|
|
|
|
)
|
2020-05-16 08:09:44 +01:00
|
|
|
}
|