Files
wecom_it_smart_desk/_check_json.py
T

20 lines
876 B
Python
Raw Normal View History

import json
d = json.load(open('docs_cmp_result2.json', encoding='utf-8'))
cd = d['content_dup']
nd = d['name_diff']
targets = ["00-系统架构设计文档-v1.3", "02-产品需求文档PRD-v1.2", "01-OTP首次绑定与重置",
"Neo4j图数据库方案", "技术方案-摇人协作", "技术方案-消息功能详细设计",
"技术方案-邀请功能", "功能编号与文档关联表", "增量设计-知识库迭代"]
print("=== content_dup 命中 ===")
for t in targets:
hit = [(o, nn) for o, nn in cd if t in o]
print(" [%s] -> %d" % (t, len(hit)))
for o, nn in hit[:2]:
print(" 旧:%s 新:%s" % (o, nn))
print("=== name_diff 命中 ===")
for t in targets:
hit = [row for row in nd if t in row[0]]
print(" [%s] -> %d" % (t, len(hit)))
for row in hit[:2]:
print(" 旧:%s 新:%s" % (row[0], row[3]))