-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
26 lines (21 loc) · 697 Bytes
/
main.py
File metadata and controls
26 lines (21 loc) · 697 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
import sys
from lib.utility.utility import logging, check_function, check_api_key, check_api
from lib.utility.functions import functions
def main():
arguments = sys.argv[1:]
logging.debug(arguments)
parameters = {
'api': arguments[0],
'function': arguments[1],
'format': arguments[2],
'save': (False, True)[arguments[3] == "True"],
'filters': arguments[4],
'restore': (False, True)[arguments[5] == "True"]
}
logging.debug(parameters)
api_key = check_api_key()
api = check_api(parameters['api'])
check_function(api, parameters['function'])
functions(api_key, parameters)
if __name__ == "__main__":
main()