Update Config File Generator
This commit is contained in:
@@ -4,4 +4,7 @@ version = 1.21
|
|||||||
[ACCOUNT]
|
[ACCOUNT]
|
||||||
key = NK
|
key = NK
|
||||||
id = NA
|
id = NA
|
||||||
|
usernname = NK
|
||||||
|
friendcode = NK
|
||||||
|
awards = []
|
||||||
|
|
||||||
|
|||||||
20
CLI/Init.py
20
CLI/Init.py
@@ -20,10 +20,11 @@ parser.add_argument('-backend', help="Runs the app in backend mode (no UI)", act
|
|||||||
|
|
||||||
#declare default vars
|
#declare default vars
|
||||||
class Config():
|
class Config():
|
||||||
|
|
||||||
|
|
||||||
AccountKey = "NK"
|
AccountKey = "NK"
|
||||||
AccountID = "NA"
|
AccountID = "NA"
|
||||||
|
AccountUsername = "NoAccount"
|
||||||
|
AccountFriendCode = "NK"
|
||||||
|
AccountAwards = []
|
||||||
version = APP_VERSION
|
version = APP_VERSION
|
||||||
|
|
||||||
class ServerObj():
|
class ServerObj():
|
||||||
@@ -91,11 +92,26 @@ def WarnMissingConfig(ConfigError):
|
|||||||
|
|
||||||
|
|
||||||
def makeConfig():
|
def makeConfig():
|
||||||
|
#
|
||||||
|
# AccountKey = "NK"
|
||||||
|
# AccountID = "NA"
|
||||||
|
# AccountUsername = "NoAccount"
|
||||||
|
# AccountFriendCode = "NK"
|
||||||
|
# AccountAwards = []
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
config['DEFAULT'] = {'Version': Config.version}
|
config['DEFAULT'] = {'Version': Config.version}
|
||||||
config['ACCOUNT'] = {}
|
config['ACCOUNT'] = {}
|
||||||
config['ACCOUNT']['KEY'] = "NK"
|
config['ACCOUNT']['KEY'] = "NK"
|
||||||
config['ACCOUNT']["ID"] = "NA"
|
config['ACCOUNT']["ID"] = "NA"
|
||||||
|
config['ACCOUNT']['Usernname'] = "NK"
|
||||||
|
config['ACCOUNT']['FriendCode'] = "NK"
|
||||||
|
config['ACCOUNT']['Awards'] = "[]"
|
||||||
|
|
||||||
|
|
||||||
with open('Config.ini', 'w') as configfile:
|
with open('Config.ini', 'w') as configfile:
|
||||||
config.write(configfile)
|
config.write(configfile)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user