forked from mariosemes/PornHub-downloader-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
phdler.py
55 lines (42 loc) · 1.36 KB
/
phdler.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
52
53
54
55
#!/usr/bin/env python
from functions import *
def main():
check_for_database()
if len(sys.argv) > 1:
if sys.argv[1] == "start":
dl_start()
elif sys.argv[1] == "custom":
if len(sys.argv) > 2:
custom_dl(sys.argv[2])
else:
how_to_use("Missing item")
elif sys.argv[1] == "add":
if len(sys.argv) > 2:
add_check(sys.argv[2])
else:
how_to_use("Missing item")
elif sys.argv[1] == "delete":
if len(sys.argv) > 2:
type_check(sys.argv[2])
list_items(sys.argv[2])
u_input = input("Please enter the ID to delete (or c to cancel): ")
if u_input == "c":
print("Operation canceled.")
else:
delete_item(u_input)
else:
how_to_use("Missing item")
elif sys.argv[1] == "list":
if len(sys.argv) > 2:
type_check(sys.argv[2])
list_items(sys.argv[2])
else:
how_to_use("Missing item")
elif sys.argv[1] == "help":
help_command()
else:
how_to_use("Command not found!")
else:
how_to_use("Missing command.")
if __name__ == '__main__':
main()