-
Notifications
You must be signed in to change notification settings - Fork 1
/
cli.py
51 lines (46 loc) · 1.21 KB
/
cli.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
41
42
43
44
45
46
47
48
49
50
51
import argparse
def parse_arguments():
parser = argparse.ArgumentParser(
description="Command line interface for zoomer.py",
formatter_class=argparse.RawTextHelpFormatter,
)
parser.add_argument(
"-gmp",
"--getmousepos",
action="store_true",
help="\ndescr:command to get mouse position \n",
)
parser.add_argument(
"-m",
dest="subject",
metavar="subject",
help="\ndescr:manually enter the subject \n\n",
)
parser.add_argument(
"-a",
dest="append",
nargs=3,
metavar=("subject", "id", "password"),
help="descr:append data to passwords.csv \n\n",
)
parser.add_argument(
"-p",
"--passwd",
dest="changepass",
nargs=2,
metavar=("subject", "new_password"),
help="descr:change the password corresponding to the subject \n\n",
)
parser.add_argument(
"-u",
"--updatepass",
dest="updatepass",
metavar="path",
# fmt: off
help=(
"descr:updates passwords.csv with"
"data extracted from docx at path \n\n"
),
# fmt: on
)
return parser.parse_args()