-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathcommands.py
41 lines (38 loc) · 1.01 KB
/
commands.py
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
""" commands.py contains the data structures that cli.py uses to construct the arguments/subcommand structure.
"""
# global arguments and flags to the command, like '--verbose' or '--debug'
cmd_arg = [
{
name: "verbose",
action: "store_const"
},
{
name: "debug",
action: "store_const"
}
]
# subcommands used by the program, like 'bdot init' or 'bdot search'.
# Subcommands are tied to functions, so you must specify a function to use with each subcommand.
sub_cmd = [
{
name: "init",
help: "create a pybluedot configuration file",
options: [
{
name: "--force",
action: "store_const"
},
{
name: "--display",
action: "store_const"
}
],
function: "init"
},
{
name: "sounds",
help: "just useless boilerplate atm!",
options: [],
function: "sounds"
}
]