微信小程序页面迁移校验之前 P5任务处理之前

This commit is contained in:
Neo
2026-03-09 01:19:21 +08:00
parent 263bf96035
commit 6e20987d2f
1112 changed files with 153824 additions and 219694 deletions

View File

@@ -0,0 +1,30 @@
"""One-time script to insert goods/inventory domain analysis into dwd-table-structure-overview.md"""
import pathlib
DOC = pathlib.Path("docs/reports/dwd-table-structure-overview.md")
MARKER_7 = "<!-- 字段语义分析将在任务 1.7 中填充 -->\n\n## 8. 库存域"
MARKER_8 = "<!-- 字段语义分析将在任务 1.7 中填充 -->\n\n\n## 9."
# Read the section 7 and 8 content from a separate file
CONTENT_FILE = pathlib.Path("scripts/ops/_goods_inventory_content.md")
content = DOC.read_text(encoding="utf-8")
insert_content = CONTENT_FILE.read_text(encoding="utf-8")
# Split the insert content at the section 8 boundary marker
parts = insert_content.split("===SECTION_8_BOUNDARY===")
section7_content = parts[0]
section8_content = parts[1] if len(parts) > 1 else ""
# Replace section 7 placeholder
old7 = "<!-- 字段语义分析将在任务 1.7 中填充 -->\n\n## 8. 库存域"
new7 = section7_content.rstrip() + "\n\n## 8. 库存域"
content = content.replace(old7, new7, 1)
# Replace section 8 placeholder
old8 = "<!-- 字段语义分析将在任务 1.7 中填充 -->\n\n\n## 9."
new8 = section8_content.rstrip() + "\n\n\n## 9."
content = content.replace(old8, new8, 1)
DOC.write_text(content, encoding="utf-8")
print(f"Done. File size: {len(content)} chars")