继续优化
This commit is contained in:
@@ -652,7 +652,10 @@ def main():
|
||||
if not twole_folder.exists():
|
||||
twole_folder = base_dir / "二一教育"
|
||||
if not twole_folder.exists():
|
||||
twole_folder = base_dir / "21世纪教育"
|
||||
twole_folder = base_dir / "21世纪教育"
|
||||
if not twole_folder.exists():
|
||||
twole_folder = base_dir / "二一世纪教育"
|
||||
|
||||
if not twole_folder.exists():
|
||||
print("❌ 文件夹不存在,请先解压文件")
|
||||
# 将失败的文件移动到本程序所在目录的 ee 子目录
|
||||
@@ -668,6 +671,17 @@ def main():
|
||||
|
||||
associations = build_file_associations(word_content, twole_folder, zxxk_folder)
|
||||
|
||||
if not associations["items"]:
|
||||
# 移动到ee目录
|
||||
script_dir = Path(__file__).parent
|
||||
ee_dir = script_dir / "ee"
|
||||
ee_dir.mkdir(exist_ok=True)
|
||||
dest_file = ee_dir / folder.name
|
||||
shutil.move(str(folder), str(dest_file))
|
||||
print(f" 已移动空关联文件夹到:{dest_file}")
|
||||
fail_count += 1
|
||||
continue
|
||||
|
||||
# 保存 JSON 文件
|
||||
output_file = server_jsons_dir / f"{word_doc.stem}.json"
|
||||
with open(output_file, 'w', encoding='utf-8') as f:
|
||||
|
||||
Reference in New Issue
Block a user