import re
from collections import Counter
html = open('index_main.html', encoding='utf-8').read()
ids = re.findall(r'\{id:"([^"]+)",s:"([^"]+)",n:"([^"]+)",en:"([^"]+)"', html)
print(f'当前 PROGRAMS 总数: {len(ids)}')
c = Counter(x[1] for x in ids)
for k,v in sorted(c.items(), key=lambda x:-x[1]):
    print(f'  {k}: {v}')
print()
print('=== 已入库项目英文名 ===')
for pid,s,n,en in ids:
    print(f'  [{s}] {en}')
