# -*- coding: utf-8 -*-
import io, sys, os
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding="utf-8")
os.chdir(r"D:\work buddy\2026-11-05-14-15-52")

CSS = """*{box-sizing:border-box;margin:0;padding:0}body{font-family:-apple-system,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;background:#f5f7fa;color:#222;line-height:1.6;padding:24px}.wrap{max-width:1080px;margin:0 auto}.top{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}.back{color:#1a5fb4;text-decoration:none;font-size:14px}.school-tag{background:#e8f0fe;color:#1a5fb4;padding:4px 12px;border-radius:12px;font-size:13px}.grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.card{background:#fff;border-radius:10px;padding:18px 20px;box-shadow:0 1px 3px rgba(0,0,0,.06)}.card.full{grid-column:1/-1}h1{font-size:22px;margin-bottom:6px;color:#1a2a4a}h2{font-size:15px;color:#1a5fb4;margin-bottom:10px;padding-bottom:6px;border-bottom:1px solid #eef1f5}.kv{display:flex;justify-content:space-between;padding:5px 0;font-size:14px}.kv .k{color:#666}.kv .v{font-weight:500;text-align:right;max-width:62%}.stem{display:inline-block;background:#e6f4ea;color:#1e7e34;padding:2px 8px;border-radius:4px;font-size:12px;margin-left:6px}.stem0{background:#fdecea;color:#c0392b}.note{background:#fff8e1;border-left:3px solid #f0a020;padding:10px 14px;border-radius:4px;font-size:13px;margin-top:8px}.url{word-break:break-all}.tag{display:inline-block;background:#eef1f5;color:#444;padding:2px 8px;border-radius:4px;font-size:12px;margin:2px 4px 2px 0}ul{padding-left:20px;font-size:14px}li{margin-bottom:4px}"""

def build(title, school, deg, disc, stem, dur, core, elect, note, url, dept):
    stem_cls = "stem" if stem else "stem stem0"
    stem_txt = "STEM-designated" if stem else "非 STEM OPT"
    core_html = "".join(f"<li>{c}</li>" for c in core)
    elect_html = "".join(f'<span class="tag">{e}</span>' for e in elect)
    return f"""<!DOCTYPE html><html lang="zh-CN"><head><meta charset="UTF-8"><title>{title}</title><style>{CSS}</style></head><body><div class="wrap">
<div class="top"><a class="back" href="../index_main.html">← 返回项目库</a><span class="school-tag">{school}</span></div>
<h1>{title} <span class="{stem_cls}">{stem_txt}</span></h1>
<div class="grid">
<div class="card"><h2>学位与学制</h2>
<div class="kv"><span class="k">学位</span><span class="v">{deg}</span></div>
<div class="kv"><span class="k">院系</span><span class="v">{dept}</span></div>
<div class="kv"><span class="k">学制</span><span class="v">{dur}</span></div>
<div class="kv"><span class="k">学科大类</span><span class="v">{disc}</span></div>
</div>
<div class="card"><h2>录取与标化</h2>
<div class="kv"><span class="k">截止日期</span><span class="v">catalog 页未列具体轮次（待补）</span></div>
<div class="kv"><span class="k">语言要求</span><span class="v">TOEFL iBT / IELTS Academic（最低分待补）</span></div>
<div class="kv"><span class="k">GRE</span><span class="v">catalog 页未列（待补）</span></div>
<div class="kv"><span class="k">学费</span><span class="v">catalog 页未列打包学费（待补）</span></div>
</div>
<div class="card full"><h2>核心课程 / 培养要求</h2><ul>{core_html}</ul></div>
<div class="card full"><h2>选修方向</h2><div>{elect_html}</div></div>
<div class="card full"><h2>说明</h2><div class="note">{note}</div></div>
<div class="card full"><h2>官方来源</h2><div class="kv url"><span class="k">官网项目页</span><span class="v">{url}</span></div></div>
</div></div></body></html>"""

pages = []

# 1. Medical Physics MS（覆盖占位）
pages.append(("details/gatech-medical-physics-ms.html", build(
    "佐治亚理工学院 医学物理硕士（MS Medical Physics）",
    "佐治亚理工 Georgia Tech", "MS", "工程/生物医学工程", 1,
    "35 学分；Thesis/Non-Thesis 双选；在校 on-campus MS；GPA 3.0；另有 distance learning 视频版面向在职专业人士（按口径排除）",
    ["MP 4750 Diagnostic Imaging Physics 诊断影像物理 3cr",
     "MP 6011 Seminar in Medical Physics I 医学物理研讨 1cr",
     "MP 6203 Radiation Therapy Treatment Planning Lab 放射治疗计划实验 1cr",
     "MP 6204 Radiation Therapy Physics 放射治疗物理 4cr",
     "MP 6300 Radiological Anatomy 放射解剖学 1cr",
     "MP 6406 Radiation Dosimetry & Protection 放射剂量与防护 4cr",
     "MP 6407 Radiation Biology and Oncology 放射生物与肿瘤学 3cr",
     "MP 6756 Radiation Physics 放射物理 3cr",
     "MP 6757 Radiation Detection 辐射探测 3cr",
     "Non-Thesis：MP 8903 Special Problems (Project) 3cr + 其他研究生选修课 9cr；Thesis：9cr Thesis Hours + 选修 3cr"],
    ["Diagnostic Imaging", "Radiation Therapy", "Radiation Dosimetry", "Radiological Anatomy", "Medical Physics Seminar"],
    "本页仅录在校 on-campus MS MP；distance learning 视频版面向政府/工业界在职专业人士，按口径排除。项目聚焦放射在医学诊断与治疗中的应用，PhD 通道挂在核工程 PhD 项目下。",
    "https://catalog.gatech.edu/programs/medical-physics-ms/",
    "核与放射工程/医学物理系（NRE）")))

# 2. Music Technology MS（新建）
pages.append(("details/gatech-music-technology-ms.html", build(
    "佐治亚理工学院 音乐技术硕士（MS Music Technology）",
    "佐治亚理工 Georgia Tech", "MS", "计算机/艺术技术交叉", 1,
    "48 学分；4 学期；Project Track / Thesis Track 双轨；跨 music/computing/EE/ME/ID；需 portfolio 创意技术作品；至少 30cr 6000-level",
    ["MUSI 6001 Music Perception and Cognition 音乐感知与认知 3cr",
     "MUSI 6003 Music Technology History and Repertoire 音乐技术史 3cr",
     "MUSI 6202 Digital Signal Processing for Music Analysis and Synthesis 音乐 DSP 3cr",
     "MUSI 8001 Research Methods 研究方法 3cr",
     "MUSI 7100 Music Technology Research Lab 12cr（研究）",
     "Project Track：21cr 核心 + 15cr 选修 + 12cr 研究；Thesis Track：21cr 核心 + 9cr 选修 + 12cr 研究 + 6cr Thesis Preparation"],
    ["Computer Supported Interactive Music", "Technology Ensemble", "Project Studio in Music Technology", "Music Recording and Mixing", "Integrating Music into Multimedia", "AI/认知科学/机器人/教育/网络"],
    "跨学科项目，面向音乐/计算/工程/工业设计背景；录取需展示音乐演奏/作曲/理论背景 + 计算/工程基础 + portfolio。毕业去向为专业软件/硬件/音频公司、艺术娱乐产业、学术市场。",
    "https://catalog.gatech.edu/programs/music-technology-ms/",
    "School of Music（音乐学院）")))

# 3. GIST MS（新建）
pages.append(("details/gatech-gist-ms.html", build(
    "佐治亚理工学院 地理信息科学与技术硕士（MS Geographic Information Science and Technology, GIST）",
    "佐治亚理工 Georgia Tech", "MS", "计算机/空间分析", 1,
    "34 学分；全日制 1 年（两学期课程 + 夏季 capstone）；非全日制 2-3 学年；先修 GIS 基础（CP 4510/6514 或同等课程或 1 年行业经验）",
    ["CP 6006 Visualization for Planners 规划可视化 1cr",
     "CP 6024 Quantitative and Computer Methods 定量与计算机方法 4cr",
     "CP 6521 Advanced Geographic Information Systems 高级 GIS 3cr",
     "CP 6531 Introduction to Remote Sensing 遥感导论 3cr",
     "CP 6581 Programming for Geographic Information Systems GIS 编程 3cr",
     "CP 6591 GIS Professionalization GIS 职业素养 1cr",
     "CP 6592 Capstone Project Research 顶点项目研究 1cr",
     "CP 6595 GIS Systems Design and Management GIS 系统设计与管理 3cr",
     "CP 6596 GIS Capstone Project GIS 顶点项目 3cr"],
    ["Socioeconomic GIS", "Environmental Analysis Using GIS", "Transport & GIS", "INFO 530 GIS for Public Health（Emory 公卫跨选）", "城市规划/建筑/公策/土木/环境工程自由选修"],
    "跨学科空间信息科学，应用于城市规划、建筑、土木环境、地球大气、环境、人口、物流、管理、公策、可持续研究。全日制 1 年紧凑完成。",
    "https://catalog.gatech.edu/programs/gist-ms/",
    "城市与区域规划学院（School of City and Regional Planning）")))

# 4. Earth & Atmospheric Sciences MS（新建）
pages.append(("details/gatech-earth-atmospheric-sciences-ms.html", build(
    "佐治亚理工学院 地球与大气科学硕士（MS Earth and Atmospheric Sciences）",
    "佐治亚理工 Georgia Tech", "MS", "理科/地球科学", 1,
    "30 学分；Thesis Option（带论文 designated）/ Non-Thesis Option（undesignated）双选；先修微积分/化学/物理各 1 年；毕业 GPA 2.7",
    ["EAS 6000-level 及以上核心课 12cr",
     "EAS 4000-level 及以上主领域选修 6cr",
     "Thesis：EAS 7000 Master's Thesis 6cr + undesignated 6cr（可含 thesis hours）",
     "Non-Thesis：EAS 6000-level 及以上 9cr + EAS 8901 Special Problems 研究项目 3cr"],
    ["Atmospheric Chemistry 大气化学", "Aerosols & Clouds 气溶胶与云", "Dynamics of Weather and Climate 天气气候动力", "Geochemistry 地球化学", "Geophysics 地球物理", "Oceanography 海洋学", "Paleoclimate 古气候", "Planetary Science 行星科学", "Remote Sensing 遥感"],
    "提供 BS/MS 本校加速通道（大气海洋科学/环境科学/固体地球与行星科学本科，GPA 3.0，修满 90cr 后申请，可抵 6cr EAS 本科课）。",
    "https://catalog.gatech.edu/programs/earth-atmospheric-sciences-ms/",
    "地球与大气科学学院（EAS）")))

# 5. Building Construction & Facility Management MS（新建）
pages.append(("details/gatech-building-construction-facility-management-ms.html", build(
    "佐治亚理工学院 建筑施工与设施管理硕士（MS Building Construction and Facility Management）",
    "佐治亚理工 Georgia Tech", "MS", "商科/工程管理", 0,
    "30 学分；Thesis/Non-Thesis 双选；两个 concentration（Program & Facility Management / Technology）； evening classes 在职友好；面向 industry professionals",
    ["BC 6650 Advanced Project Management 高级项目管理 3cr",
     "BC 6550 Design and Construction Processes for Integrated Services 设计与施工集成流程 3cr",
     "BC 6250 Value Management for Integrated Facility Design and Construction 设施价值管理 3cr",
     "BC 6300 Safety and Environmental Issues 安全与环境议题 3cr",
     "BC 6685 Leadership and Communications in Design and Construction 设计施工领导力沟通 3cr",
     "Thesis：BC 7100 Quantitative Methods for Construction Research 3cr + Master's Thesis 6cr；Non-Thesis：Concentration 12cr + 选修 3cr"],
    ["BC 6185 Construction Program Management", "BC 6485 Preconstruction Phase as Owner", "BC 6200 Maintenance Management of Built Assets", "BC 6100 Professional Trends in Facility Management", "BC 6050 BIM for Multi-disciplinary Integration", "BC 6005 Technology Applications in Construction Industry", "BC 8803 Digital Twins for Built Environment", "BC 8803 Construction 4.0", "BC 6675 Residential Design", "BC 6370 Real Estate Policy", "BC 6600 Facilities Management Financial Analysis", "BC 6475 Real Estate Development Law", "BC 6350 Design and Construction Law"],
    "本项目为在校 MS 但以 evening classes 授课，面向建筑/设施/工程/规划/管理/商科背景行业从业者，培养执行领导岗。非纯远程在线，但课程多在晚间；按口径保留在校版。",
    "https://catalog.gatech.edu/programs/building-construction-facility-management-ms/",
    "School of Building Construction（建筑施工学院）")))

for path, html in pages:
    with open(path, "w", encoding="utf-8") as f:
        f.write(html)
    print("WROTE", path, len(html))
