-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.py
More file actions
executable file
·31 lines (24 loc) · 769 Bytes
/
run.py
File metadata and controls
executable file
·31 lines (24 loc) · 769 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
#!/usr/bin/env python
# Simple startup script for Citation-Overlap
import pathlib
import sys
from citov import config, extractor, logs
def main():
"""Start the graphical interface."""
# set up logging including a log handler for uncaught exceptions
logger = logs.setup_logger()
logs.add_file_handler(
logger, pathlib.Path(config.user_app_dirs.user_data_dir) / "out.log")
sys.excepthook = logs.log_uncaught_exception
# parse command-line args
paths, outputFileName = extractor.parseArgs()
if any(paths.values()):
# run CLI if any database args given
extractor.main(paths, outputFileName)
else:
# launch graphical interface
from citov import gui
gui.main()
if __name__ == "__main__":
print("Starting Citation-Overlap run script...")
main()