# -*- coding: utf-8 -*-
import io, sys, json, re
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding="utf-8")
BASE = r"D:\work buddy\2026-11-05-14-15-52"
d = json.load(open(BASE + r"\raw_vanderbilt.json", encoding="utf-8"))

NAV = re.compile(r"programs-departments/\?|department-contacts|academic-calendar|/forms|honor-council|/research|/academics/?$|certificate|program-finder|/admissions|/how-to|/admitted|/costandfunding|/student-resources|/about|/news|/events|/give|/visit|/isss|/postdoc|/apply|/contact|privacy|accessibility|/catalog|/financialaid|/student-life|/nashville|/campuses|/housing|/organizations|/health-safety|/faculty|/commencement|/concern|/awards|/staff|/career|/community-engag|prospective|admitted-students|annual-reports|podcast|story|history|quick-facts|university-leadership|virtual-tour", re.I)

def name(t):
    x = re.sub(r"Master's|Doctoral|Bachelor's|Online|Program", " ", t)
    x = re.sub(r"\s+", " ", x).split(".")[0].strip()
    return x

for x in d:
    h = x["h"]
    if NAV.search(h): continue
    print(name(x["t"])[:32], "||", h.split("vanderbilt.edu")[-1][:34])
