aboutsummaryrefslogtreecommitdiffstats
path: root/muddle.py
diff options
context:
space:
mode:
authorNao Pross <np@0hm.ch>2020-10-19 09:29:49 +0200
committerNao Pross <np@0hm.ch>2020-10-19 09:29:49 +0200
commit7f6171c6faf042aeac54f55891687f2828ae0008 (patch)
treec32970863589d7ca74e0452f6f5cdba7fd55ca97 /muddle.py
parentCleaner requests error and exception handling (diff)
downloadMuddle-7f6171c6faf042aeac54f55891687f2828ae0008.tar.gz
Muddle-7f6171c6faf042aeac54f55891687f2828ae0008.zip
Add LICENSE and version
Diffstat (limited to '')
-rw-r--r--muddle.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/muddle.py b/muddle.py
index 5c96316..f763280 100644
--- a/muddle.py
+++ b/muddle.py
@@ -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"])