feat: picture auto-generate

This commit is contained in:
zhayujie
2022-12-19 01:25:34 +08:00
parent 06065853a9
commit bf50694658
9 changed files with 186 additions and 64 deletions

View File

@@ -10,16 +10,14 @@ config = {}
def load_config():
global config
config_path = "config.json"
try:
if not os.path.exists(config_path):
logger.error('配置文件路径不存在')
return
config_str = read_file(config_path)
# 将json字符串反序列化为dict类型
config = json.loads(config_str)
logger.info("[INIT] load config: {}".format(config))
except Exception as e:
logger.error(e)
if not os.path.exists(config_path):
raise Exception('配置文件不存在请根据config-template.json模板创建config.json文件')
config_str = read_file(config_path)
# 将json字符串反序列化为dict类型
config = json.loads(config_str)
logger.info("[INIT] load config: {}".format(config))
def get_root():