fix: 适配没有英语名字的情况

This commit is contained in:
2025-12-12 17:24:32 +08:00
parent cbf87d2569
commit 9d347f9bc9
9 changed files with 181 additions and 34 deletions

View File

@@ -191,3 +191,14 @@ def initialize_project(root_dir="."):
logger.warning(
f"⚠️ 警告: 模板文件不存在 ({src_excel})data 文件夹内将没有 Excel 文件。"
)
def check_file_exists(file_path):
"""
判断文件是否存在
"""
if (file_path and isinstance(file_path, str) and os.path.exists(file_path)):
logger.info(f"✅ 文件存在: {file_path}")
return True
else:
logger.error(f"❌ 文件不存在: {file_path}")
return False