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.
 
 
 
 
 
 

16 lines
628 B

# -*- coding: utf-8 -*-
# t08-list.py — 列出 A4 客户管理页面清单
import io, sys, os
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')
base = '.scratch/opportunity-bugfix/lanhu-pages'
names = sorted(n for n in os.listdir(base) if n.startswith('A4'))
for n in names:
# 打印页名 + 控件数(从文件头抓「控件: N / 有文本: M」)
head = open(os.path.join(base, n), 'r', encoding='utf-8').read(400)
meta = ''
for ln in head.splitlines():
if ln.startswith('- 控件:'):
meta = ln.strip()
break
print(n, meta)
print('TOTAL', len(names))