|
1 | 1 | #!/bin/python3 |
2 | 2 | # -*- coding: UTF-8 -*- |
3 | 3 | # Author: M. Reinmuth, B. Herfort |
4 | | -######################################################################################################################## |
| 4 | +#################################################################################################### |
5 | 5 |
|
6 | 6 | import sys |
7 | | -# add some files in different folders to sys. |
8 | | -# these files can than be loaded directly |
9 | | -sys.path.insert(0, '../cfg/') |
10 | | -sys.path.insert(0, '../utils/') |
11 | 7 |
|
12 | 8 | import logging |
13 | 9 |
|
14 | | -import error_handling |
15 | | - |
16 | | -from export_project_results import export_project_results |
17 | | -from export_projects import export_projects |
18 | | -from export_users_and_stats import export_users_and_stats |
19 | | - |
20 | | -from auth import firebase_admin_auth |
21 | | -from send_slack_message import send_slack_message |
| 10 | +from export_module.export_project_results import export_project_results |
| 11 | +from export_module.export_projects import export_projects |
| 12 | +from export_module.export_users_and_stats import export_users_and_stats |
| 13 | +from cfg.auth import firebase_admin_auth |
| 14 | +from utils.send_slack_message import send_slack_message |
22 | 15 |
|
23 | 16 | import time |
24 | 17 | import argparse |
|
27 | 20 | # define arguments that can be passed by the user |
28 | 21 | parser = argparse.ArgumentParser(description='Process some integers.') |
29 | 22 | parser.add_argument('-l', '--loop', dest='loop', action='store_true', |
30 | | - help='if loop is set, the import will be repeated several times. You can specify the behaviour using --sleep_time and/or --max_iterations.') |
| 23 | + help='if loop is set, the import will be repeated several times.' |
| 24 | + 'You can specify the behaviour using --sleep_time / --max_iterations.') |
31 | 25 | parser.add_argument('-s', '--sleep_time', required=False, default=None, type=int, |
32 | | - help='the time in seconds for which the script will pause in beetween two imports') |
| 26 | + help='time in seconds for which the script will pause in beetween two imports.') |
33 | 27 | parser.add_argument('-m', '--max_iterations', required=False, default=None, type=int, |
34 | 28 | help='the maximum number of imports that should be performed') |
35 | 29 |
|
|
39 | 33 | parser.add_argument('-p', '--user_project_list', nargs='+', required=None, default=None, type=int, |
40 | 34 | help='project id of the project to process. You can add multiple project ids.') |
41 | 35 | parser.add_argument('-o', '--output_path', required=None, default='/var/www/html', type=str, |
42 | | - help='output path. please provide a location where the exported files should be stored.') |
| 36 | + help='output path. Provide a location for storing export files.') |
| 37 | + |
| 38 | +#################################################################################################### |
43 | 39 |
|
44 | | -######################################################################################################################## |
45 | 40 |
|
46 | 41 |
|
47 | 42 | def get_projects(): |
|
0 commit comments