~nicohman/raven

ref: fc1506277d195eafaf9cdfbb4f490aeb323c3785 raven/src/args.rs -rw-r--r-- 4.9 KiB
fc150627 — nicohman Increment version number, update Cargo.lock 2 years ago
                                                                                
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
#[derive(StructOpt, Debug)]
#[structopt(name = "raven")]
pub enum Raven {
    #[structopt(name = "load", about = "Load a complete theme")]
    Load {
        theme: String,
        #[structopt(flatten)]
        verbose: clap_verbosity_flag::Verbosity,
    },
    #[structopt(name = "new", about = "Create a new theme")]
    New {
        name: String,
        #[structopt(flatten)]
        verbose: clap_verbosity_flag::Verbosity,
    },
    #[structopt(
        name = "modify",
        about = "Open the currently edited themes's option in $EDITOR"
    )]
    Modify {
        /// Use custom editor
        #[structopt(short = "e", long = "editor")]
        editor: Option<String>,
        name: String,
        #[structopt(flatten)]
        verbose: clap_verbosity_flag::Verbosity,
    },
    #[structopt(name = "delete", about = "Delete a theme")]
    Delete {
        name: String,
        #[structopt(flatten)]
        verbose: clap_verbosity_flag::Verbosity,
    },
    #[structopt(
        name = "info",
        about = "Print info about the theme being currently edited"
    )]
    Info {
        #[structopt(flatten)]
        verbose: clap_verbosity_flag::Verbosity,
    },
    #[structopt(name = "refresh", about = "Load last loaded theme")]
    Refresh {
        #[structopt(flatten)]
        verbose: clap_verbosity_flag::Verbosity,
    },
    #[structopt(name = "install", about = "Install a theme from ThemeHub repo")]
    Install {
        name: String,
        /// Don't prompt for confirmation
        #[structopt(short = "f", long = "force")]
        force: bool,
        #[structopt(flatten)]
        verbose: clap_verbosity_flag::Verbosity,
    },
    #[structopt(name = "add", about = "Add option to current theme")]
    Add {
        option: String,
        name: String,
        #[structopt(flatten)]
        verbose: clap_verbosity_flag::Verbosity,
    },
    #[structopt(name = "rm", about = "Remove an option from edited theme")]
    Rm {
        name: String,
        #[structopt(flatten)]
        verbose: clap_verbosity_flag::Verbosity,
    },
    #[structopt(name = "key", about = "Add a key-value option")]
    Key {
        key: String,
        value: String,
        #[structopt(flatten)]
        verbose: clap_verbosity_flag::Verbosity,
    },
    #[structopt(name = "edit", about = "Edit theme")]
    Edit {
        name: String,
        #[structopt(flatten)]
        verbose: clap_verbosity_flag::Verbosity,
    },
    #[structopt(name = "menu", about = "Show theme menu")]
    Menu {
        #[structopt(flatten)]
        verbose: clap_verbosity_flag::Verbosity,
    },
    #[structopt(name = "manage", about = "Manage online themes")]
    ManageO(Manage),
    #[structopt(name = "cycle", about = "Control cycle daemon")]
    CycleD(Cycle),
}
#[derive(StructOpt, Debug)]
pub enum Manage {
    #[structopt(name = "export", about = "Export a theme to a tarball")]
    Export {
        name: String,
        #[structopt(flatten)]
        verbose: clap_verbosity_flag::Verbosity,
    },
    #[structopt(name = "import", about = "Import a theme from a tarball")]
    Import {
        name: String,
        #[structopt(flatten)]
        verbose: clap_verbosity_flag::Verbosity,
    },
    #[structopt(name = "publish", about = "Publish an account online")]
    Publish {
        name: String,
        #[structopt(flatten)]
        verbose: clap_verbosity_flag::Verbosity,
    },
    #[structopt(name = "create", about = "Create an account")]
    Create {
        name: String,
        pass1: String,
        pass2: String,
        #[structopt(flatten)]
        verbose: clap_verbosity_flag::Verbosity,
    },
    #[structopt(
        name = "delete_user",
        about = "Delete an online user's profile and owned themes"
    )]
    DUser {
        pass: String,
        #[structopt(flatten)]
        verbose: clap_verbosity_flag::Verbosity,
    },
    #[structopt(name = "logout", about = "Log out of your user profile")]
    Logout {
        #[structopt(flatten)]
        verbose: clap_verbosity_flag::Verbosity,
    },
    #[structopt(name = "unpublish", about = "Delete an online theme")]
    Unpublish {
        name: String,
        #[structopt(flatten)]
        verbose: clap_verbosity_flag::Verbosity,
    },
    #[structopt(name = "login", about = "Log in to an user's account")]
    Login {
        name: String,
        pass: String,
        #[structopt(flatten)]
        verbose: clap_verbosity_flag::Verbosity,
    },
}
#[derive(StructOpt, Debug)]
pub enum Cycle {
    #[structopt(name = "start", about = "Start the daemon")]
    Start {
        #[structopt(flatten)]
        verbose: clap_verbosity_flag::Verbosity,
    },
    #[structopt(name = "check", about = "Check if daemon is running")]
    Check {
        #[structopt(flatten)]
        verbose: clap_verbosity_flag::Verbosity,
    },
    #[structopt(name = "stop", about = "Stop the daemon")]
    Stop {
        #[structopt(flatten)]
        verbose: clap_verbosity_flag::Verbosity,
    },
}