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.

12 lines
464 B

7 days ago
# 定位 PRD 中 §3.3 / §7.9 / §5.4 相关节
import io, sys
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')
import re
t = open('.scratch/opportunity-module/商机业务-PRD.md', encoding='utf-8').read()
print('len:', len(t))
for m in re.finditer(r'^#{1,4}[^\n]*', t, re.M):
head = m.group(0)
if re.search(r'(3\.3|7\.9|5\.4|状态|受限|出边|联动)', head):
ln = t[:m.start()].count('\n') + 1
print(ln, head[:70])