# -*- coding: utf-8 -*-
import io, sys, os, json, re
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding="utf-8")
os.chdir(r"D:\work buddy\2026-11-05-14-15-52")
t=open("index_main.html",encoding="utf-8").read()
prog=t[t.find("const PROGRAMS="):t.find("const CATD=")]
prog_dets=set(re.findall(r'url:"([^"]+)"',prog))
todo=json.load(open("todo_upgrade.json",encoding="utf-8"))
items=todo["list"] if isinstance(todo,dict) else todo
for x in items:
    s=x.get("s","")
    if s in ("notre","jhu"):
        det=os.path.basename(x.get("det",""))
        mark="IN" if x.get("det") in prog_dets else "  "
        print(mark,s,"|",x.get("disc"),"|",x.get("deg"),"|",x.get("en","")[:50],"|",det,"|",x.get("url","")[:70])
