"""Render README.md as a standalone HTML preview (GitHub-ish style).""" import markdown from pathlib import Path root = Path(r"D:\workspace\Agi\zrd-nb666") md_text = (root / "README.md").read_text(encoding="utf-8") body = markdown.markdown(md_text, extensions=["fenced_code", "tables", "toc"]) html = f""" zrd-nb666 README preview {body}""" out = root / "_readme_preview.html" out.write_text(html, encoding="utf-8") print(out)