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
#![cfg_attr(test, deny(warnings))]
pub mod error;
pub mod output;
mod action;
mod hero;
pub use action::{commands, Action};
pub use hero::{Quality, Hero};
pub fn app() -> clap::App<'static,'static>
{
clap::App::new("dsa-cli")
.version("0.3.0")
.author("benaryorg <binary@benary.org>")
.about("Calculates DSA Rolls")
.setting(clap::AppSettings::SubcommandRequiredElseHelp)
.arg
( clap::Arg::with_name("format")
.short("o")
.long("output")
.alias("format")
.value_name("FORMAT")
.help("output format")
.possible_values(&output::Format::variants())
.default_value("humanreadable")
.case_insensitive(true)
)
}