← 返回
未分类 中文

HTML Markdown Hybrid

Combine high-quality Markdown to HTML rendering with robust HTML to Markdown extraction in one skill. Use when converting Markdown into nicer-looking standal...
将高质量的 Markdown 转 HTML 渲染与强大的 HTML 转 Markdown 提取功能集于一个技能,用于将 Markdown 转换为更美观的独立 HTML 文档。
520xiaomumu 520xiaomumu 来源
未分类 clawhub v1.1.1 1 版本 99751.9 Key: 无需
★ 2
Stars
📥 362
下载
💾 0
安装
1
版本
#latest

概述

HTML Markdown Hybrid

Overview

This skill combines the best parts of two separate tools:

  • scripts/pretty_markdown_to_html.py for better-looking Markdown to HTML output
  • scripts/html_to_markdown.mjs for stronger HTML to Markdown conversion, URL fetching, cleanup profiles, metadata, and reports
  • scripts/markdown_to_html.mjs as an optional Node-based Markdown to HTML fallback when batch directory conversion or theme switching is more important than final polish

Decision rule

Use this skill when the task is any of the following:

  • turn Markdown into a presentable standalone HTML page
  • convert a web page, raw HTML, or HTML file into clean Markdown
  • batch-convert many Markdown or HTML files
  • keep article-style readability cleanup or metadata during conversion
  • compare conversion quality between a pretty renderer and a more configurable pipeline

Recommended default path

Markdown → HTML

Use the Python renderer first when visual output quality matters most.

python scripts/pretty_markdown_to_html.py input.md -o output.html --theme light --title "Document"

Use this for:

  • AI日报转网页
  • 文档展示页
  • 报告、newsletter、分享页
  • 任何最终要给人直接阅读的 HTML 页面

Why this is the default:

  • it produces cleaner default styling
  • it embeds CSS inline
  • it is lighter and simpler to run
  • this copy is patched to read and write UTF-8 explicitly on Windows

HTML → Markdown

Use the Node pipeline first for HTML extraction and cleanup.

node scripts/html_to_markdown.mjs \
  --url "https://example.com/article" \
  --out ./article.md \
  --profile article \
  --engine best \
  --meta-frontmatter true \
  --report ./article.report.json

Use this for:

  • 网页文章转 Markdown
  • HTML 文件清洗后转 Markdown
  • 批量转换目录
  • URL 列表抓取转 Markdown

Read references/profiles.md when choosing article, docs, forum, or custom.

Optional fallback: Markdown → HTML with Node

Use the Node renderer when you need directory batch conversion or its built-in themes.

node scripts/markdown_to_html.mjs \
  --file ./README.md \
  --out ./README.html \
  --theme github

Use it when:

  • converting an entire markdown directory to HTML
  • the github or minimal theme is specifically desired
  • one workflow should stay entirely inside Node

Do not make this the first choice when the user explicitly cares most about frontend presentation quality.

Quick chooser

  • Best-looking Markdown page → pretty_markdown_to_html.py
  • Web article to clean Markdown → html_to_markdown.mjs --profile article
  • Docs portal to Markdown → html_to_markdown.mjs --profile docs
  • Batch Markdown folder to HTML → markdown_to_html.mjs --input-dir ... --output-dir ...
  • Need metadata/report/frontmatter → use the Node HTML to Markdown script

Files in this skill

  • scripts/pretty_markdown_to_html.py
  • scripts/html_to_markdown.mjs
  • scripts/markdown_to_html.mjs
  • references/profiles.md
  • package.json

Setup notes

The Node scripts depend on packages listed in package.json.

If dependencies are not installed yet, run:

npm install

from the skill directory before using the Node scripts.

The Python renderer uses only the standard library and needs no extra dependencies.

Practical recommendation

For the exact kind of comparison where the same AI news markdown was rendered two ways, prefer:

  • Markdown source → pretty_markdown_to_html.py
  • HTML/article source → html_to_markdown.mjs

That gives the stronger visual result in one direction and the stronger cleanup/extraction result in the other.

版本历史

共 1 个版本

  • v1.1.1 当前
    2026-05-07 19:04 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

office-efficiency

Word / DOCX

ivangdavila
创建、检查和编辑 Microsoft Word 文档及 DOCX 文件,支持样式、编号、修订记录、表格、分节符及兼容性检查等功能。
★ 456 📥 151,357
office-efficiency

Gog

steipete
Google Workspace 命令行工具,支持 Gmail、日历、云端硬盘、通讯录、表格和文档。
★ 925 📥 186,586
office-efficiency

Excel / XLSX

ivangdavila
创建、检查和编辑 Microsoft Excel 工作簿及 XLSX 文件,支持可靠的公式、日期、类型、格式、重算及模板保留功能。
★ 380 📥 143,927