-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.py
More file actions
38 lines (27 loc) · 879 Bytes
/
run.py
File metadata and controls
38 lines (27 loc) · 879 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
27
28
29
30
31
32
33
34
35
36
37
38
#!/usr/bin/python
# -*- coding: UTF-8 -*-
import argparse
import pyfiglet
from app.config import create_app
def semanticat_cli():
SEMANTICAT_LOGO = pyfiglet.figlet_format("SEMANTIC@")
print(SEMANTICAT_LOGO)
print("XML formats with semantic annotations © 2022\n")
parser = argparse.ArgumentParser()
parser.add_argument('--dev_mode', action='store_true')
parser.add_argument('--erase_recreate_db', action='store_true')
args = parser.parse_args()
PORT = 3000
dropDB = False
if args.erase_recreate_db:
dropDB = True
if args.dev_mode:
app = create_app(config="dev",
erase_recreate=dropDB)
app.run(port=PORT)
else:
app = create_app(config=None,
erase_recreate=dropDB)
app.run(port=PORT)
if __name__ == '__main__':
semanticat_cli()