# -*- coding: utf-8 -*-
import io, sys, os, re, html
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding="utf-8")
os.chdir(r"D:\work buddy\2026-11-05-14-15-52")
def clean(fn):
    raw=open(fn,"rb").read().decode("utf-8","ignore")
    raw=html.unescape(re.sub(r"<script.*?</script>","",raw,flags=re.S)); raw=html.unescape(re.sub(r"<style.*?</style>","",raw,flags=re.S))
    t=re.sub(r"<[^>]+>"," ",raw); return html.unescape(re.sub(r"\s+"," ",t))
esi=clean("_18_esi.txt")
for kw in ["Innovator","Inventor","Visionary","placement","Industry R&D","track"]:
    m=re.search(re.escape(kw),esi)
    if m:
        s=max(0,m.start()-60); e=min(len(esi),m.end()+260); print(f"[ESI {kw}] {esi[s:e]}\n")
me=clean("_17_me.txt")
for kw in ["Master of Science","Master of Engineering","30 didactic","24 didactic","Focus Areas","Surgical Robotics","Mechatronics","Energy","Nanotechnology","research","thesis"]:
    m=re.search(re.escape(kw),me)
    if m:
        s=max(0,m.start()-70); e=min(len(me),m.end()+220); print(f"[ME {kw}] {me[s:e]}\n")
