# -*- coding: utf-8 -*- """MISSING 4 bruno files bootstrap: mkdir via unicode escapes (pure-ASCII source), copy small folder.bru from tmp, create BRU_PLACEHOLDER_M4 skeletons for the 4 big files.""" import os import shutil DOCS = r"D:\code\crm-api-docs" TMP_FOLDER = r"d:\code\crm-backend-matt\tmp\m4-f-folder.bru" D_REGION = "\u516c\u5171\u4f9d\u8d56-\u884c\u653f\u533a\u5212" # 公共依赖-行政区划 F_LIST = "\u6309\u4e0a\u7ea7\u67e5\u5b50\u533a\u5212.bru" # 按上级查子区划.bru F_LEVEL = "\u6309\u5c42\u7ea7\u67e5\u533a\u5212.bru" # 按层级查区划.bru D_SYS = "\u7cfb\u7edf\u7ba1\u7406" # 系统管理 D_OPS = "\u8fd0\u7ef4" # 运维 F_DT = "\u9489\u9489\u7ec4\u7ec7\u540c\u6b65.bru" # 钉钉组织同步.bru F_AR = "\u7ba1\u7406\u5458\u89d2\u8272\u914d\u7f6e.bru" # 管理员角色配置.bru for parts in [[D_REGION], [D_SYS, D_OPS]]: os.makedirs(os.path.join(DOCS, *parts), exist_ok=True) folder_dst = os.path.join(DOCS, D_REGION, "folder.bru") shutil.copyfile(TMP_FOLDER, folder_dst) print("COPIED", os.path.relpath(folder_dst, DOCS), os.path.getsize(folder_dst), "bytes") for parts in [[D_REGION, F_LIST], [D_REGION, F_LEVEL], [D_SYS, D_OPS, F_DT], [D_SYS, D_OPS, F_AR]]: p = os.path.join(DOCS, *parts) with open(p, "w", encoding="utf-8", newline="") as f: f.write("BRU_PLACEHOLDER_M4") print("PLACE", os.path.relpath(p, DOCS))