mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-12 09:48:20 +08:00
Opt: Not loading and saving argument database anymore
Because time consumption is significantly increased - Add: Force update template.yaml - Opt: Choose daily commission before boxes to prevent dailies unfinished after a full day of run - Opt: Improve multiline test in yaml
This commit is contained in:
@@ -14,6 +14,17 @@ LANGUAGES = ['zh-CN', 'en-US', 'zh-TW']
|
||||
# LANGUAGES = ['zh-CN']
|
||||
|
||||
|
||||
# https://stackoverflow.com/questions/8640959/how-can-i-control-what-scalar-form-pyyaml-uses-for-my-data/15423007
|
||||
def str_presenter(dumper, data):
|
||||
if len(data.splitlines()) > 1: # check for multiline string
|
||||
return dumper.represent_scalar('tag:yaml.org,2002:str', data, style='|')
|
||||
return dumper.represent_scalar('tag:yaml.org,2002:str', data)
|
||||
|
||||
|
||||
yaml.add_representer(str, str_presenter)
|
||||
yaml.representer.SafeRepresenter.add_representer(str, str_presenter)
|
||||
|
||||
|
||||
def filepath_arg():
|
||||
return './module/config/args.yaml'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user