# -*- coding: utf-8 -*-
"""打印 requirements?app=admission&major= 报告里的关键信息块。"""
import io, re, sys
for f in sys.argv[1:]:
    t = io.open(f, encoding='utf-8', errors='ignore').read()
    lines = [l.strip() for l in t.split('\n')]
    lines = [l for l in lines if l]
    print('=====', f.split('\\')[-1])
    out = []
    on = False
    for l in lines:
        if l.startswith('Admissions Requirements for the Graduate Major') or l.startswith('2027-2028 Admission') or l.startswith('Deadlines to apply'):
            on = True
        if on:
            out.append(l)
        if l.startswith('Leading to'):
            break
    print('\n'.join(out))
