-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy patharguments.py
More file actions
31 lines (22 loc) · 778 Bytes
/
arguments.py
File metadata and controls
31 lines (22 loc) · 778 Bytes
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
import argparse
def custom_help_formatter(prog):
"""fixing the ugly looking help menu"""
return argparse.HelpFormatter(prog, max_help_position=46)
def get_arguments():
"""creating arguments"""
parser = argparse.ArgumentParser(
formatter_class=custom_help_formatter,
description="pyspodl - a spotify downloader using librespot / https://github.com/devlocalhost/pyspodl",
)
parser.add_argument(
"-l",
"--link",
type=str,
help='link (s) to download, all in quotes, separated by a space: "link1 link2 link3"',
)
parser.add_argument(
"-c", "--config-path", type=str, help="the path of the config file"
)
return parser.parse_args()
if __name__ == "__main__":
get_arguments()