diff options
Diffstat (limited to '')
-rw-r--r-- | muddle.py | 16 |
1 files changed, 15 insertions, 1 deletions
@@ -13,6 +13,9 @@ import json import moodle import gui + +MUDDLE_VERSION = "0.1.0" + # A R G U M E N T S parser = argparse.ArgumentParser(description="Moodle Scraper") @@ -20,9 +23,11 @@ parser.add_argument("-g", "--gui", help="start with graphical interface", action parser.add_argument("-v", "--verbose", help="be more verbose", action="store_true") parser.add_argument("-c", "--config", help="configuration file", type=str) parser.add_argument("-l", "--logfile", help="where to save logs", type=str) +parser.add_argument("-V", "--version", help="version", action="store_true") args = parser.parse_args() # L O G G I N G + logformatter = logging.Formatter("%(name)s - %(levelname)s - %(message)s") log = logging.getLogger("muddle") log.setLevel(logging.DEBUG) @@ -100,7 +105,16 @@ config = configparser.ConfigParser() config.read(config_file) -# G R A P H I C S +# S T A R T + +if args.version: + print(f"""Version {MUDDLE_VERSION} +Muddle Copyright (C) 2020-2021 Nao Pross <np@0hm.ch> + +This program comes with ABSOLUTELY NO WARRANTY; This is free software, and you +are welcome to redistribute it under certain conditions; see LICENSE.txt for +details. Project repository: https://github.com/NaoPross/Muddle +""") if args.gui: gui.start(config["server"]["url"], config["server"]["token"]) |