-
Notifications
You must be signed in to change notification settings - Fork 1
/
auto.py
executable file
·30 lines (22 loc) · 893 Bytes
/
auto.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
__version__ = 3.0
__author__ = 'Abdul El-Assaad'
from auto_data import Database
import argparse
def setup_parser():
"""
Define all the CLI arguments here
"""
parser = argparse.ArgumentParser(description='SSH Task Automation Tool v{}'.format(__version__))
parser.add_argument('-file',default='auto.xls', dest='filename', required=True,
help='Specify the name of the file which contains the tasks')
parser.add_argument('-turbo', action='store_true', dest='turbo', default=False,
help='Enable multiprocessing mode, task executed in random order')
results = parser.parse_args()
return results
if __name__ == '__main__':
args = setup_parser()
db = Database(args.filename)
if args.turbo:
db.start_all_tasks_turbo()
else:
db.start_all_tasks_normal()