You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

45 lines
2.3 KiB

# -*- coding: utf-8 -*-
"""生成 shots-index.md 对账表:截图 × 文本库 × 正式树归属"""
import json, io, sys
from pathlib import Path
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')
ROOT = Path(r'e:\code\crm-backend-matt\.scratch\a7-parity')
TXT = Path(r'e:\code\crm-backend-matt\.scratch\opportunity-bugfix\lanhu-pages')
shots = json.loads((ROOT / 'shot-a7.json').read_text(encoding='utf-8'))
txt_files = {f.stem.upper(): f.name for f in TXT.glob('A7-*.md')}
# 正式树 31 页(sitemap A7 后台管理子树),backup 区 3 页
BACKUP = {'a7-2-3_数据共享', 'a7-2-3-1_新建_编辑共享规则', 'a7-2-3-2_共享规则详情'}
rows = []
for s in sorted(shots, key=lambda x: x['page']):
name = s['page']
key = name.upper()
txt = txt_files.get(key, '⚠缺失')
zone = 'backup' if name in BACKUP else '正式树'
rows.append(f"| {name} | {zone} | {txt} | {s['dim'][0]}x{s['dim'][1]} | {s['kb']}KB | {s['js_errors']} |")
md = """# A7 截图落盘对账表(票 01 交付物)
- 拉取: `.scratch/a7-parity/fetch-a7-pages.mjs`(OSS 直下 + 本地渲染目录)· 截图: `shot-a7.py`(Playwright fullPage)
- 蓝湖改写还原三件套: img data-src→src / link src→href / body display:none 剥离;渲染注入 `lanhu_Axure_Mapping_Data` 恒等
- 文本库: `.scratch/opportunity-bugfix/lanhu-pages/A7-*.md`(34 文件)
- 清单: v29(`.scratch/lanhu-latest/axure-v29.json`)A7 共 34 页 = 正式树 31 + backup 草稿箱 3
| 页面 | 归属 | 文本库 | 尺寸(px) | 大小 | JS错误 |
|---|---|---|---|---|---|
"""
md += '\n'.join(rows) + '\n'
n_ok = len(shots)
md += f"""
## 结论
- 截图 {n_ok}/34 全部成功、js_errors 全 0;文本库对照零缺失。
- 正式树 31 页(A7-1:2 / A7-2:5 / A7-3:20 / A7-4:3 / A7-5:1)+ backup「数据共享」3 页,验收口径达成(票面写 29 系建图时按 pages-index 口径误计,实为 31,map 已同步修正)。
- 大页(宽 >6000px)共 14 张:批注区并排导致,文字缩放后偏小——盘点票以文本库为主、此类截图做结构/布局验证;需要细读时可对 pages/ 本地渲染做 viewport 分块截图。
"""
(ROOT / 'shots-index.md').write_text(md, encoding='utf-8')
print(f'shots-index.md written, {n_ok} rows')