main.py 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. from src.common import CommonUti
  2. from src.tools import Tools
  3. output_folder_pc="output"
  4. json_folder_pc="C:/Workspaces/Code_Git/MTP20_WEB_GLOBAL/public/locales/"
  5. oem_json_folder_pc = "C:/Workspaces/Code_Git/MTP20_WEB_GLOBAL/oem/"
  6. output_folder_manage="output_manage"
  7. json_folder_manage="C:/Workspaces/Code_Git/MTP2.0_NEWMANAGE_WEB\public/locales/"
  8. oem_json_folder_manage = "C:/Workspaces/Code_Git/MTP2.0_NEWMANAGE_WEB/oem/"
  9. if __name__ == "__main__":
  10. while True:
  11. platform = input("请选择平台 (pc, manage, exit): ")
  12. if platform == "exit":
  13. break
  14. type = input("请选择生成类型 (excel, json): ")
  15. if platform == "pc":
  16. oem = "tss"
  17. inc_file = "20241127_tss_inc"
  18. if type == "excel":
  19. # 生成交易前端excel及增量
  20. Tools.generate_excel(oem, inc_file, output_folder_pc, json_folder_pc, oem_json_folder_pc)
  21. elif type == "json":
  22. # 生成交易前端json及增量
  23. Tools.generate_json(oem, output_folder_pc, json_folder_pc, oem_json_folder_pc)
  24. elif platform == "manage":
  25. oem = "newmanage"
  26. inc_file = "20241201_newmanage_inc"
  27. if type == "excel":
  28. # 生成新管理后台excel及增量
  29. Tools.generate_excel(oem, inc_file, output_folder_manage, json_folder_manage, oem_json_folder_manage)
  30. elif type == "json":
  31. # 生成新管理后台json
  32. Tools.generate_json(oem, output_folder_manage, json_folder_manage, oem_json_folder_manage)
  33. else:
  34. print("输入错误,请重新输入...")
  35. print("==============================")