28 lines
1.5 KiB
Python
28 lines
1.5 KiB
Python
path = 'c:/NeoZQYY/docs/h5_ui/compare/AGENT-PLAYBOOK.md'
|
|
with open(path, 'rb') as f:
|
|
content = f.read().decode('utf-8')
|
|
|
|
# Insert 5.4.4 before 5.5
|
|
marker = '### 5.5 '
|
|
idx = content.find(marker)
|
|
print('5.5 at:', idx)
|
|
assert idx >= 0
|
|
|
|
insert = (
|
|
'### 5.4.4 \u6700\u5927\u91cd\u8bd5\u9650\u5236\uff08\u5f3a\u5236\uff09\n\n'
|
|
'\u91cd\u8bd5\u8ba1\u6570\u89c4\u5219\uff1a\n'
|
|
'- \u6bcf\u8f6e\u4fee\u6b63\u540e\u5dee\u5f02\u7387\u4e0b\u964d **>0.5%** \u2192 \u91cd\u8bd5\u8ba1\u6570\u91cd\u7f6e\u4e3a 0\n'
|
|
'- \u5dee\u5f02\u7387\u4e0b\u964d \u22640.5%\uff08\u6216\u4e0a\u5347\uff09\u2192 \u91cd\u8bd5\u8ba1\u6570 +1\n'
|
|
'- \u91cd\u8bd5\u8ba1\u6570\u8fbe\u5230 **5** \u4e14\u5dee\u5f02\u7387\u4f9d\u7136 \u22655% \u2192 \u6267\u884c\u8df3\u8fc7\u6d41\u7a0b\uff1a\n\n'
|
|
'\u8df3\u8fc7\u6d41\u7a0b\uff1a\n'
|
|
'1. \u5c06\u5f53\u524d\u6700\u4f73\u5dee\u5f02\u7387\u3001\u5269\u4f59\u504f\u5dee\u6e05\u5355\u8bb0\u5f55\u5230 `report.md`\n'
|
|
'2. \u5728 report.md \u6807\u6ce8\uff1a`[\u8df3\u8fc7] \u5dee\u5f02\u7387 X.XX%\uff0c\u8fde\u7eed 5 \u8f6e\u65e0\u5b9e\u8d28\u4e0b\u964d\uff0c\u8df3\u8fc7\u539f\u56e0\uff1a<\u7b80\u8ff0>`\n'
|
|
'3. \u8fd4\u56de\u4e3b\u4ee3\u7406\uff0c\u4e3b\u4ee3\u7406\u8bb0\u5f55\u540e\u7ee7\u7eed\u4e0b\u4e00\u5355\u5143\n\n'
|
|
'> \u793a\u4f8b\uff1a11%\u2192\u4fee\u6b633\u6b21\u65e0\u6548\uff0c\u7b2c4\u8f6e\u964d\u81f38%\uff08\u4e0b\u964d3%>0.5%\uff09\u2192\u8ba1\u6570\u91cd\u7f6e\u4e3a0\uff0c\u7ee7\u7eed\u4fee\u6b63\u3002\n\n'
|
|
)
|
|
|
|
content = content[:idx] + insert + content[idx:]
|
|
with open(path, 'wb') as f:
|
|
f.write(content.encode('utf-8'))
|
|
print('Done. 5.4.4 inserted.')
|