Skip to content

Commit

Permalink
Fixed offline requirement, resolves #12
Browse files Browse the repository at this point in the history
  • Loading branch information
gastamper committed Jul 1, 2021
1 parent b72510e commit 9ff0c16
Showing 1 changed file with 25 additions and 25 deletions.
50 changes: 25 additions & 25 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,35 +141,35 @@ macro_rules! get_archive_list {
fn main() {
let matches = App::new("annparse")
.arg(Arg::with_name("url")
.short("u")
.long("url")
.help("URL of specific mailing list entry to parse")
.takes_value(true))
.short("u")
.long("url")
.help("URL of specific mailing list entry to parse")
.takes_value(true))
.arg(Arg::with_name("verbose")
.short("v")
.long("verbose")
.help("verbosity level")
.multiple(true))
.short("v")
.long("verbose")
.help("verbosity level")
.multiple(true))
.arg(Arg::with_name("advisory")
.short("a")
.long("advisory")
.help("Advisory to query")
.takes_value(true))
.short("a")
.long("advisory")
.help("Advisory to query")
.required(true)
.takes_value(true))
.arg(Arg::with_name("cr")
.short("c")
.long("cr")
.help("Use CR-announce instead of CentOS-aannounce"))
.arg(Arg::with_name("offline")
.short("o")
.long("offline")
.help("Offline mode (use local cache directory ./cache for archives)"))
.short("c")
.long("cr")
.help("Use CR-announce instead of CentOS-announce"))
.arg(Arg::with_name("cache_path")
.short("p")
.long("cache_path")
.help("Path to offline cache folder")
.takes_value(true)
.requires("offline")
.default_value("./cache"))
.short("p")
.long("cache_path")
.help("Path to offline cache folder")
.requires("offline")
.default_value_if("offline", None, "./cache"))
.arg(Arg::with_name("offline")
.short("o")
.long("offline")
.help("Offline mode (use local cache directory ./cache for archives)"))
.get_matches();
let verbosity = match matches.occurrences_of("verbose") {
0 => "info",
Expand Down

0 comments on commit 9ff0c16

Please sign in to comment.