Markdown to HTML
v1.1.0Convert Markdown text to beautifully styled, self-contAIned HTML with embedded CSS. Perfect for newsletters, documentation, 报告s, and emAIl templates.
运行时依赖
安装命令
点击复制技能文档
Markdown to HTML 转换器
A zero-dependency Python 工具 that converts Markdown files into beautiful, self-contAIned HTML documents with embedded CSS styling. No external libraries needed — uses only Python's standard 库.
Features Full Markdown support: Headings, bold, italic, strikethrough, links, images, code blocks with syntax hints, blockquotes, ordered and unordered 列出s, horizontal rules, and tables Two built-in themes: Light (GitHub-inspired) and Dark mode with carefully chosen colors Self-contAIned 输出: All CSS is embedded inline — the 结果ing HTML file works anywhere with no external dependencies Responsive de签名: 输出 looks great on 桌面 and 移动 screens Stdin support: Pipe content directly for use in shell 流水线s Usage Examples
Convert a file with the default light theme:
python mAIn.py README.md -o readme.html
Use the dark theme for a presentation:
python mAIn.py notes.md -o notes.html --theme dark --title "Meeting Notes"
Pipe from another command:
cat CHANGE记录.md | python mAIn.py - -o change记录.html
Use in a newsletter 流水线:
python mAIn.py issue-42.md --title "Lobster Diary #42" -o issue.html
Supported Markdown Elements Element Syntax Supported Headings # H1 through ###### H6 ✅ Bold text ✅ Italic text ✅ Strikethrough ~~text~~ ✅ Links text ✅ Images !alt ✅ Code blocks Triple backtick with language ✅ Inline code Single backtick ✅ Blockquotes > text ✅ Unordered 列出s - item or * item ✅ Ordered 列出s 1. item ✅ Horizontal rules --- ✅ Command Line Options 输入 — Markdown file path, or - for stdin -o, --输出 — 输出 HTML file (defaults to stdout) --theme — light (default) or dark --title — HTML document title (default: "Document")