summaryrefslogtreecommitdiff
path: root/bin/domain/imag-mail/src/ui.rs
diff options
context:
space:
mode:
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 5114286..2462e15 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")