core-extra/daemon/scripts/coretk-gui

24 lines
738 B
Python
Executable file

#!/usr/bin/env python
import argparse
import logging
from core.gui import appconfig
from core.gui.app import Application
from core.gui.images import Images
if __name__ == "__main__":
# 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
log_format = "%(asctime)s - %(levelname)s - %(module)s:%(funcName)s - %(message)s"
logging.basicConfig(level=logging.DEBUG, format=log_format)
logging.getLogger("PIL").setLevel(logging.ERROR)
# start app
Images.load_all()
appconfig.check_directory()
app = Application(args.proxy)
app.mainloop()