First version, seems to work
This commit is contained in:
commit
81ffe5a50f
8 changed files with 380 additions and 0 deletions
lib
19
lib/config.py
Normal file
19
lib/config.py
Normal file
|
@ -0,0 +1,19 @@
|
|||
import json
|
||||
|
||||
def load():
|
||||
try:
|
||||
configFile = open('config.json', 'r', encoding='utf-8')
|
||||
config = json.load(configFile)
|
||||
configFile.close()
|
||||
except:
|
||||
config = {
|
||||
'translate': [],
|
||||
'podcasts': [],
|
||||
}
|
||||
return config
|
||||
|
||||
def save(configData):
|
||||
configFile = open('config.json', 'w', encoding='utf-8')
|
||||
json.dump(configData, configFile, indent=4)
|
||||
configFile.write('\n')
|
||||
configFile.close()
|
Loading…
Add table
Add a link
Reference in a new issue