def config_(action, **kw):
"""
Configure your launcher and game preferences.
The 'action' argument is optional, and can be 'reset' or 'wizard'.
If it's left blank, only given options will be set.
Else, given options will be set AFTER the corresponding action is executed.
"""
if action == 'reset':
ok = click.prompt('Are you sure you want to reset you settings?', confirmation_prompt=True)
if ok:
config.reset()
elif action == 'wizard':
_wizard()
for k, v in kw.items():
if v is None:
break
if isinstance(v, str) and v[0] == '=':
v = v[1:]
config[k.replace('-', '_')] = v
config.save()
评论列表
文章目录