-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinitdb.py
28 lines (23 loc) · 1.04 KB
/
initdb.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
import argparse
from stackquery.database import init_db
def init_argparse():
parser = argparse.ArgumentParser(description='Database tools')
parser.add_argument('--all', action='store_true',
help='Populate all tables', default=False)
parser.add_argument('--projects', action='store_true',
help='Populate projects table')
parser.add_argument('--release', action='store_true',
help='Populate release table')
parser.add_argument('--user', action='store_true',
help='Populate user table')
parser.add_argument('--team', action='store_true',
help='Populate team table', default=False)
parser.add_argument('--report', action='store_true',
help='Populate report table')
parser.add_argument('--filters', action='store_true',
help='Populate filters table')
args = parser.parse_args()
return args
if __name__ == '__main__':
args = init_argparse()
init_db(args)