# -*- coding: utf-8 -*-
import io, sys, os, 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()
s=t[t.find("const PROGRAMS="):t.find("const CATD=")]
dets=["details/cornell-c89ab8d.html","details/cornell-c524860.html","details/cornell-cbd0bbe.html","details/cornell-c5d718f.html","details/cornell-c396d2c.html"]
for d in dets:
    print(d,"| PROG",("IN" if d in s else "no"),"| disk",("exists" if os.path.exists(d) else "absent"),os.path.getsize(d) if os.path.exists(d) else 0)
for nid in ["cornell-me-ms","cornell-che-ms","cornell-cee-ms","cornell-mse-ms","cornell-apphys-ms"]:
    print(nid,"used" if ('{id:"'+nid+'"') in s else "free")
print("last",re.findall(r'\{id:"([^"]+)",[\s\S]*?url:"([^"]+)"',s)[-1])
