# -*- coding: utf-8 -*-
import json, pathlib, sys
sys.path.insert(0, r"D:\work buddy\2026-11-05-14-15-52")
import detail_render as dr

BASE = pathlib.Path(r"D:\work buddy\2026-11-05-14-15-52")
IDS = ["ucsd-ece-phd", "ucsd-mae-phd", "ucsd-cse-phd", "ucsd-biosci-phd",
       "uchicago-cs-phd", "uchicago-stats", "uchicago-econ-phd", "uchicago-booth-fin-phd"]
for i in IDS:
    spec = json.loads((BASE / "_r387_specs" / (i + ".json")).read_text(encoding="utf-8"))
    out = BASE / spec["out"]
    out.write_text(dr.render(spec), encoding="utf-8")
    print("rendered", i, out.stat().st_size, "bytes")

