# -*- coding: utf-8 -*-
import io, sys, os, json, collections, re
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding="utf-8")
os.chdir(r"D:\work buddy\2026-11-05-14-15-52")
todo=json.load(open("todo_upgrade.json",encoding="utf-8"))
print("todo 总数",len(todo))
by=collections.Counter(t["s"] for t in todo)
print("按校:",dict(by))
# 热门优先级 disc 顺序
order={"cs":0,"eng":1,"biz":2,"sci":3,"med":4,"soc":5,"art":6,"edu":7}
todo.sort(key=lambda t:(order.get(t.get("disc",""),9), t["s"]))
for t in todo[:40]:
    print(f'{t["s"]:12} {t.get("disc","?"):4} {t.get("deg",""):7} {t["en"][:46]:46} | {t.get("col","")[:18]:18} | {t["det"]}')
