Files
skills-lottery-picker/novels/round3/check_final.py
T
2026-06-19 06:38:31 +00:00

18 lines
568 B
Python

import re, os
rr = re.compile(r'[\u4e00-\u9fff]')
D = '/app/working/workspaces/default/novels/round3/03-满级大佬回新手村'
ok = 0
need = 0
for f in sorted(os.listdir(D)):
if not f.endswith('.md') or not f.startswith('第'):
continue
with open(os.path.join(D, f), 'r', encoding='utf-8') as fp:
h = len(rr.findall(fp.read()))
flag = 'OK' if h >= 2000 else 'NEED'
print(f' {flag} {f}: {h}')
if h >= 2000:
ok += 1
else:
need += 1
print(f'\n达标: {ok}/{ok+need}, 需补充: {need}')