# -*- coding: utf-8 -*-
import io, sys, os, re, json
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding="utf-8")
os.chdir(r"D:\work buddy\2026-11-05-14-15-52")
idx=open("index_main.html",encoding="utf-8").read()
catd=idx[idx.find("const CATD="):]
for c in ["usc-ca09c65","usc-cf4d6bc","usc-ce5bd50","usc-cf67a4b"]:
    m=re.search(r'\["usc",[^\n]*'+c,catd)
    print(c,"->",m.group(0)[:170] if m else "NOT IN CATD")
todo={x["det"]:x for x in json.load(open("todo_upgrade.json",encoding="utf-8"))}
for c in ["usc-ca09c65","usc-cf4d6bc","usc-ce5bd50"]:
    x=todo.get("details/"+c+".html")
    if x: print("TODO",c,x["deg"],"|",x["en"],"|",x["url"])
