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.
25 lines
1.1 KiB
25 lines
1.1 KiB
# -*- coding: utf-8 -*-
|
|
# t08-extract2.py — A4 关键页批注提取(修正版:直接取超长大单元格)
|
|
import io, sys
|
|
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')
|
|
|
|
base = '.scratch/opportunity-bugfix/lanhu-pages/'
|
|
files = [
|
|
'A4-3-3-1_新增客户信息.md', # 客户主档字段集
|
|
'A4-1-1_客户公海列表(列表视图).md', # 公海机制
|
|
'A4-7-1_客户交割(发起交接).md', # 交割深水区
|
|
'A4-3-3-4_OCR快捷新增.md', # OCR 入口形态
|
|
'A4-4-6_客户详情(战略协议).md', # 战略协议(单客户唯一约束线索)
|
|
]
|
|
for fn in files:
|
|
lines = open(base + fn, 'r', encoding='utf-8').read().splitlines()
|
|
print(f'\n===== {fn} ({len(lines)} 行) =====')
|
|
longs = [(i, ln) for i, ln in enumerate(lines) if len(ln) > 300]
|
|
if not longs:
|
|
print('(无超长批注单元格)')
|
|
continue
|
|
for i, ln in longs:
|
|
# 批注大单元格:截断打印(每行最多 5500 字符,够看规则全文)
|
|
print(f'--- L{i+1} (len={len(ln)}) ---')
|
|
print(ln[:5500])
|
|
print('\ndone')
|
|
|