feat: Add config file

This commit is contained in:
Ting-Jun Wang 2021-06-19 21:37:21 +08:00
parent a90255204b
commit 0bf885baa3
Signed by: snsd0805
GPG Key ID: 8DB0D22BC1217D33
2 changed files with 15 additions and 0 deletions

7
config.json.example Normal file
View File

@ -0,0 +1,7 @@
{
"semester": "1092",
"moodle": {
"username": "學號",
"password": "密碼"
}
}

8
config.py Normal file
View File

@ -0,0 +1,8 @@
import json
class CONFIG():
@staticmethod
def get():
with open('config.json') as fp:
data = json.load(fp)
return data