diff --git a/config.json.example b/config.json.example new file mode 100644 index 0000000..671d35f --- /dev/null +++ b/config.json.example @@ -0,0 +1,7 @@ +{ + "semester": "1092", + "moodle": { + "username": "學號", + "password": "密碼" + } +} \ No newline at end of file diff --git a/config.py b/config.py new file mode 100644 index 0000000..bfb6921 --- /dev/null +++ b/config.py @@ -0,0 +1,8 @@ +import json + +class CONFIG(): + @staticmethod + def get(): + with open('config.json') as fp: + data = json.load(fp) + return data \ No newline at end of file