← 返回
效率工具 中文

Markdown Canvas

Convert markdown files to beautiful HTML pages suitable for Canvas display or browser viewing. Use when user asks to render, visualize, display, or share mar...
将Markdown文件转换为美观的HTML页面,适用于Canvas或浏览器查看。用于用户请求渲染、可视化、显示或分享Markdown文件时。
jingyu525
效率工具 clawhub v1.0.2 1 版本 99866.8 Key: 无需
★ 0
Stars
📥 750
下载
💾 13
安装
1
版本
#latest

概述

Markdown Canvas Renderer

Convert markdown files into beautiful, shareable HTML pages with zero external dependencies.

Quick Start

When a user wants to render a markdown file:

  1. Run the conversion script:

```bash

python3 scripts/convert.py

```

  1. Open in browser (if no Canvas node available):

```bash

open

```

  1. Or push to Canvas (if node paired):

```bash

canvas present file://

```

Usage Examples

Basic conversion

# Converts ai-landscape-2026.md → ai-landscape-2026.html
python3 scripts/convert.py ai-landscape-2026.md

Custom output path

python3 scripts/convert.py input.md -o /path/to/output.html

Custom page title

python3 scripts/convert.py notes.md -t "My Research Notes"

Supported Markdown Features

The converter handles:

  • Headers (# through ######)
  • Bold (text or __text__)
  • Italic (text or _text_)
  • Code blocks (``language ... ``)
  • Inline code (code)
  • Links (text)
  • Lists (unordered: - , * , + )
  • Horizontal rules (---, *, ___)

Design Philosophy

Token efficiency: Template is pre-built; only markdown content flows through the context window.

Zero dependencies: Pure Python + self-contained HTML template with embedded CSS.

Progressive enhancement: Works offline, no CDN required, renders instantly.

Workflow

  1. User requests markdown rendering
  2. Run scripts/convert.py on their file
  3. Script reads assets/template.html
  4. Script converts markdown → HTML
  5. Script injects HTML into template
  6. Output saved alongside source (or custom path)
  7. Open in browser OR push to Canvas

Token Cost Analysis

Per conversion:

  • Read SKILL.md: ~500 tokens (first time only)
  • Execute script: ~100 tokens
  • Report result: ~50 tokens

Total: ~650 tokens vs ~8000 tokens for generating full HTML each time.

Output Location

By default, output is saved next to the input file:

  • notes.mdnotes.html
  • /path/to/doc.md/path/to/doc.html

Use -o flag to specify custom location.

版本历史

共 1 个版本

  • v1.0.2 当前
    2026-03-30 03:40 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

suspicious
查看报告

🔗 相关推荐

productivity

Word / DOCX

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

Weather

steipete
获取当前天气和预报(无需API密钥)
★ 445 📥 226,304
content-creation

Wechat Image Generator

jingyu525
为微信公众号文章生成精美图片(封面、对比图、图表等),无需消耗token。适用于社交媒体帖子、文章配图等场景。
★ 0 📥 1,087