fi_cli/
cli.rs

1use structopt::StructOpt;
2
3#[derive(StructOpt, Debug)]
4#[structopt(
5    name = "fi",
6    after_help = "You can also run `fi SUBCOMMAND -h` to get more information about that subcommand."
7)]
8pub enum Cli {
9    /// Pull account and snapshot data from notion table
10    #[structopt(name = "pull")]
11    Pull {
12        /// Currency to pull data
13        #[structopt(short, long, default_value = "all")]
14        currency: String,
15    },
16    /// Display history of accounts
17    #[structopt(name = "history")]
18    History {
19        /// Currency to show history
20        #[structopt(short, long)]
21        currency: String,
22    },
23    /// Display latest sum for given currency
24    #[structopt(name = "sum")]
25    Sum {
26        /// Currency to display sum
27        #[structopt(short, long)]
28        currency: String,
29    },
30    /// Display net worth in given currency
31    #[structopt(name = "networth")]
32    NetWorth {
33        /// Currency to display total in
34        #[structopt(short, long)]
35        currency: String,
36    },
37    /// Delete all table rows
38    #[structopt(name = "delete")]
39    Delete,
40}