summaryrefslogtreecommitdiffstats
path: root/bin/domain/imag-mail/src/ui.rs
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2020-01-03 14:05:10 +0100
committerMatthias Beyer <mail@beyermatthias.de>2020-01-03 14:05:10 +0100
commit23499d18eb7b7d5e6565c42270f0123101328434 (patch)
treef497eef5be16c77a760941034668277719330dcb /bin/domain/imag-mail/src/ui.rs
parent17fc7e77d9793e2ecd53af02edfee1aa5e53e899 (diff)
parent51fd196bed12e91ca1720ea383efe97145abdcb6 (diff)
downloadimag-23499d18eb7b7d5e6565c42270f0123101328434.tar.gz
imag-23499d18eb7b7d5e6565c42270f0123101328434.tar.xz
Diffstat (limited to 'bin/domain/imag-mail/src/ui.rs')
-rw-r--r--bin/domain/imag-mail/src/ui.rs27
1 files changed, 27 insertions, 0 deletions
diff --git a/bin/domain/imag-mail/src/ui.rs b/bin/domain/imag-mail/src/ui.rs
index 51142867..2462e15e 100644
--- a/bin/domain/imag-mail/src/ui.rs
+++ b/bin/domain/imag-mail/src/ui.rs
@@ -47,6 +47,33 @@ pub fn build_ui<'a>(app: App<'a, 'a>) -> App<'a, 'a> {
.value_name("PATH"))
)
+ .subcommand(SubCommand::with_name("scan")
+ .about("Scan a directory for mails")
+ .version("0.1")
+ .arg(Arg::with_name("ignore-existing-ids")
+ .long("ignore-existing")
+ .short("I")
+ .takes_value(false)
+ .required(false)
+ .help("Ignore errors that might occur when store entries exist already"))
+
+ .arg(Arg::with_name("scan-parallel")
+ .long("parallel")
+ .takes_value(false)
+ .required(false)
+ .multiple(false)
+ .help("Scan with multiple threads. Might be faster, but might slow down other tasks"))
+
+ .arg(Arg::with_name("path")
+ .index(1)
+ .takes_value(true)
+ .multiple(true)
+ .required(true)
+ .validator(libimagutil::cli_validators::is_directory)
+ .value_name("DIR")
+ .help("Path to the directory containing mails"))
+ )
+
.subcommand(SubCommand::with_name("list")
.about("List all stored references to mails")
.version("0.1")