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.
34 lines
1.2 KiB
34 lines
1.2 KiB
|
1 week ago
|
# -*- coding: utf-8 -*-
|
||
|
|
"""t10: 看板 .bru 三副本一致性核对(grouping=tag 下同接口多副本应为同名同内容)。"""
|
||
|
|
import hashlib, io, sys
|
||
|
|
|
||
|
|
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')
|
||
|
|
DOCS = r'E:\code\crm-api-docs'
|
||
|
|
|
||
|
|
SETS = {
|
||
|
|
'board-cards': [
|
||
|
|
r'商机模块\商机公海\看板列表\看板阶段卡片.bru',
|
||
|
|
r'商机模块\商机管理\看板列表\看板阶段卡片.bru',
|
||
|
|
r'商机模块\销售机会\看板列表\看板阶段卡片.bru',
|
||
|
|
],
|
||
|
|
'board-summary': [
|
||
|
|
r'商机模块\商机公海\看板列表\看板阶段汇总.bru',
|
||
|
|
r'商机模块\商机管理\看板列表\看板阶段汇总.bru',
|
||
|
|
r'商机模块\销售机会\看板列表\看板阶段汇总.bru',
|
||
|
|
],
|
||
|
|
'page': [
|
||
|
|
r'商机模块\商机公海\商机分页.bru',
|
||
|
|
r'商机模块\商机管理\商机分页.bru',
|
||
|
|
r'商机模块\销售机会\商机分页.bru',
|
||
|
|
],
|
||
|
|
}
|
||
|
|
|
||
|
|
for name, files in SETS.items():
|
||
|
|
hashes = []
|
||
|
|
for f in files:
|
||
|
|
data = open(DOCS + '\\' + f, 'rb').read()
|
||
|
|
hashes.append(hashlib.md5(data).hexdigest())
|
||
|
|
same = len(set(hashes)) == 1
|
||
|
|
print(f'{name}: {"IDENTICAL" if same else "DIFFERENT"} ' +
|
||
|
|
' '.join(f'{h[:8]}' for h in hashes))
|