#!/usr/bin/env python3
import json
data = json.load(open('automation/data/sustainability_topics.json', 'r', encoding='utf-8'))
print(f'✅ 宇之然选题库（新战略版）')
print(f'总选题数: {len(data)}')
print(f'已发布: {len([t for t in data if t["status"]=="已发布"])}')
print(f'待处理: {len([t for t in data if t["status"]=="待处理"])}')
print('\n按领域分组:')
fields = {}
for t in sorted(data, key=lambda x: x['id']):
    f = t['field']
    fields.setdefault(f, []).append(t)
for f, items in fields.items():
    print(f'\n{f} ({len(items)}个):')
    for t in items:
        status_icon = '✅' if t['status']=='已发布' else '⏳'
        print(f'  {status_icon} {t["id"]} {t["title"]}')
