|
@@ -829,6 +829,10 @@ def main():
|
|
|
if args.extra_args and args.processor:
|
|
if args.extra_args and args.processor:
|
|
|
processor_config.extra_args = args.extra_args.split()
|
|
processor_config.extra_args = args.extra_args.split()
|
|
|
|
|
|
|
|
|
|
+ # 若处理器未配置scene_arg但用户提供了scene,使用默认场景参数名
|
|
|
|
|
+ if args.scene and not processor_config.scene_arg:
|
|
|
|
|
+ processor_config.scene_arg = args.scene_arg
|
|
|
|
|
+
|
|
|
# 覆盖虚拟环境
|
|
# 覆盖虚拟环境
|
|
|
if args.venv:
|
|
if args.venv:
|
|
|
processor_config.venv = args.venv
|
|
processor_config.venv = args.venv
|
|
@@ -870,6 +874,14 @@ def main():
|
|
|
print(f" - {t.path}{scene_suffix}")
|
|
print(f" - {t.path}{scene_suffix}")
|
|
|
if len(invalid_files) > 5:
|
|
if len(invalid_files) > 5:
|
|
|
print(f" ... 还有 {len(invalid_files) - 5} 个")
|
|
print(f" ... 还有 {len(invalid_files) - 5} 个")
|
|
|
|
|
+
|
|
|
|
|
+ # scene 必填校验(当处理器需要scene时)
|
|
|
|
|
+ if processor_config.scene_arg and not args.scene:
|
|
|
|
|
+ missing_scene = [t for t in valid_files if not t.scene]
|
|
|
|
|
+ if missing_scene:
|
|
|
|
|
+ print("\n❌ 当前处理器需要场景参数,但文件列表未提供scene且未指定--scene")
|
|
|
|
|
+ print(" 解决方法: \n1) 在列表中使用 '文件名\t场景' \n2) 或使用命令行 --scene bank_statement|financial_report")
|
|
|
|
|
+ return 1
|
|
|
|
|
|
|
|
# 确认执行
|
|
# 确认执行
|
|
|
if not args.dry_run and valid_files:
|
|
if not args.dry_run and valid_files:
|