fix validate
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import os
|
||||
import json
|
||||
|
||||
def process_json_authors(input_path, config_path="author_config.json", verbose=True):
|
||||
def process_json_authors(input_path, verbose=True):
|
||||
"""
|
||||
处理 JSON 文件中的作者信息(支持 author → authors 结构化迁移、作者名重命名和链接统一)
|
||||
|
||||
@@ -19,6 +19,10 @@ def process_json_authors(input_path, config_path="author_config.json", verbose=T
|
||||
"errors": []
|
||||
}
|
||||
|
||||
# 获取配置文件路径(和脚本在同一目录)
|
||||
script_dir = os.path.dirname(os.path.abspath(__file__))
|
||||
config_path = os.path.join(script_dir, "author_config.json")
|
||||
|
||||
if not os.path.exists(input_path):
|
||||
raise FileNotFoundError(f"路径不存在:{input_path}")
|
||||
if not os.path.exists(config_path):
|
||||
|
||||
Reference in New Issue
Block a user