2019-12-19 19:32:59 +00:00
|
|
|
#!/usr/bin/env python
|
2020-01-15 06:15:00 +00:00
|
|
|
import argparse
|
2019-12-19 19:32:59 +00:00
|
|
|
import logging
|
|
|
|
|
|
|
|
from core.gui import appconfig
|
|
|
|
from core.gui.app import Application
|
|
|
|
from core.gui.images import Images
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
2020-01-15 06:15:00 +00:00
|
|
|
# parse flags
|
|
|
|
parser = argparse.ArgumentParser(description=f"CORE Python Tk GUI")
|
|
|
|
parser.add_argument("-p", "--proxy", action="store_true", help="enable proxy")
|
|
|
|
args = parser.parse_args()
|
|
|
|
|
|
|
|
# setup logging
|
2019-12-19 19:32:59 +00:00
|
|
|
log_format = "%(asctime)s - %(levelname)s - %(module)s:%(funcName)s - %(message)s"
|
|
|
|
logging.basicConfig(level=logging.DEBUG, format=log_format)
|
2019-12-20 05:28:17 +00:00
|
|
|
logging.getLogger("PIL").setLevel(logging.ERROR)
|
2020-01-15 06:15:00 +00:00
|
|
|
|
|
|
|
# start app
|
2019-12-19 19:32:59 +00:00
|
|
|
Images.load_all()
|
|
|
|
appconfig.check_directory()
|
2020-01-15 06:15:00 +00:00
|
|
|
app = Application(args.proxy)
|
2019-12-19 19:32:59 +00:00
|
|
|
app.mainloop()
|