Files
Neo-ZQYY/scripts/ops/_p4.py
2026-03-15 10:15:02 +08:00

28 lines
1.4 KiB
Python

import sys
sys.stdout.reconfigure(encoding='utf-8')
path = 'c:/NeoZQYY/docs/h5_ui/compare/ORCHESTRATION-PLAN.md'
with open(path, 'rb') as f:
content = f.read().decode('utf-8')
lines = content.split('\n')
# Replace lines 14-18 (0-indexed: 13-17) with updated 主代理职责
old_block = lines[13:18]
print('Old block:')
for l in old_block:
print(' ', l.encode('ascii','replace').decode('ascii')[:80])
new_block = [
' \u4e3b\u4ee3\u7406\u804c\u8d23\uff1a',
' 1. \u5f00\u59cb\u65b0\u9875\u9762\u65f6\u9690\u85cf dev-fab/ai-float-button\uff0c\u786e\u8ba4\u9ed8\u8ba4\u7ef4\u5ea6/\u72b6\u6001',
' 2. \u6309 step \u987a\u5e8f\u9010\u4e2a\u4e0b\u53d1\u5355\u5143\u7ed9\u5b50\u4ee3\u7406\uff08\u5168\u81ea\u52a8\uff0c\u65e0\u9700\u4eba\u5de5\u786e\u8ba4\u6bcf\u5c4f\uff09',
' 3. \u5b50\u4ee3\u7406\u8fd4\u56de\u901a\u8fc7 \u2192 \u81ea\u52a8\u4e0b\u53d1\u4e0b\u4e00\u5c4f',
' 4. \u5b50\u4ee3\u7406\u8fd4\u56de\u300c\u9700\u56de\u9000\u300d\u65f6 \u2192 \u81ea\u52a8\u56de\u9000\u5230\u6307\u5b9a step \u91cd\u5904\u7406',
' 5. \u5b50\u4ee3\u7406\u8fd4\u56de\u300c\u8df3\u8fc7\u300d\u65f6 \u2192 \u8bb0\u5f55\u5230\u8df3\u8fc7\u65e5\u5fd7\uff0c\u7ee7\u7eed\u4e0b\u4e00\u5355\u5143',
]
lines = lines[:13] + new_block + lines[18:]
content_new = '\n'.join(lines)
with open(path, 'wb') as f:
f.write(content_new.encode('utf-8'))
print('Done. New line count:', len(lines))