-
Notifications
You must be signed in to change notification settings - Fork 7
/
args.py
25 lines (23 loc) · 1.05 KB
/
args.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
from argparse import ArgumentParser
def cmdline_args() -> dict:
parser = ArgumentParser()
parser.add_argument(
"-l",
"--links",
dest="links",
help="[path] File containing liks and actions. The file should be a list of links, one per line, following the structure: url|action|comment (if action is comment). Actions can be one of the following: upvote, downvote, comment, join, leave. The file should be in the same directory as this script.",
)
parser.add_argument(
"-a",
"--accounts",
dest="accounts",
help="[path] File containing credentials for accounts to perform the actions with. The file should be a list of usernames and passwords, one per line, following the structure: username|password. The file should be in the same directory as this script.",
)
parser.add_argument(
"-v",
"--verbose",
dest="verbose",
action="store_true",
help="[none] Print INFO messages to stdout",
)
return vars(parser.parse_args())