1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
use clap::{App, Arg, ArgMatches};
use crate::settings::args;
use crate::settings::meta::*;
pub fn parse<'a>() -> ArgMatches<'a> {
App::new(NAME)
.version(crate_version!())
.author(crate_authors!())
.about(ABOUT)
.after_help(AFTER_HELP)
.arg(
Arg::with_name("time")
.help(args::time::HELP)
.long_help(args::time::LONG_HELP)
.required(true)
.index(1)
.multiple(true),
)
.arg(
Arg::with_name("quiet")
.help(args::quiet::HELP)
.long_help(args::quiet::LONG_HELP)
.short("q")
.long("quiet"),
)
.arg(
Arg::with_name("format")
.help(args::format::HELP)
.long_help(args::format::LONG_HELP)
.short("f")
.long("format")
.takes_value(true),
)
.arg(
Arg::with_name("print_interval")
.help(args::print_interval::HELP)
.long_help(args::print_interval::LONG_HELP)
.short("i")
.long("interval")
.takes_value(true),
)
.arg(
Arg::with_name("write")
.help(args::write::HELP)
.long_help(args::write::LONG_HELP)
.short("w")
.long("write")
.takes_value(true),
)
.get_matches()
}