← 返回
未分类 中文

Markdown Mobile Export

Use when a task needs a local Markdown file path or pasted Markdown text converted into a faithful mobile-friendly PNG/JPG long image for phone-readable arti...
当需要将本地Markdown文件路径或粘贴的Markdown文本转换为适合手机阅读的PNG/JPG长图时使用
linsuisheng034
未分类 clawhub v0.1.0 1 版本 99835 Key: 无需
★ 0
Stars
📥 605
下载
💾 0
安装
1
版本
#latest

概述

Markdown Mobile Export

Faithful Markdown → mobile long image, no content rewriting.

When to Use

  • Local .md file → phone-friendly long image
  • Pasted Markdown text → PNG or JPG
  • Article-style faithful export (not poster or carousel redesign)
  • Intermediate HTML needed for inspection alongside image

Do Not Use

  • Poster redesigns where content should be rewritten into marketing blocks
  • Carousel slicing across multiple images
  • Rich web app UI design work
  • PDF output

Quick Start

# From file
python3 {baseDir}/scripts/markdown_to_long_image.py \
  --input-file /path/to/file.md

# From pasted text
python3 {baseDir}/scripts/markdown_to_long_image.py \
  --markdown-text "# Title\n\nBody"

# Custom output path and format
python3 {baseDir}/scripts/markdown_to_long_image.py \
  --input-file /path/to/file.md \
  --output-image /path/to/output.png \
  --format jpg

Defaults

AspectDefault
---------------------------------------------------------------
InputMarkdown file path or pasted text
OutputPNG long image + HTML sidecar retained on disk
StyleFaithful conversion, mobile-first, zh-CN typography
Width820px card layout with warm earth-tone theme
BrowserLocal Chrome/Chromium/Edge/Brave → Playwright fallback

Workflow

  1. Resolve input (--input-file or --markdown-text)
  2. Normalize pasted text into a concrete .source.md file when needed
  3. Render mobile-friendly HTML with embedded CSS
  4. Detect local Chromium-family browser
  5. Capture full-page screenshot (segmented stitch with overlap)
  6. Fall back to Playwright Chromium if no local browser is usable
  7. Print JSON result with output_html and output_image paths

Scripts

ScriptPurpose
-------------------------------------------------------------------------------
scripts/markdown_to_long_image.pyCLI entry point, orchestrates pipeline
scripts/render_markdown_mobile_long_image.pyMarkdown → styled mobile HTML
scripts/export_long_image.pyBrowser detection + screenshot export

References

TopicFile
--------------------------------------------------
Pipeline detailsreferences/workflow.md
Common issuesreferences/troubleshooting.md

Validation

After generating output, verify:

  1. HTML file exists at reported path
  2. Image file exists and is non-zero bytes
  3. Image is full-page capture (not single viewport crop)
  4. Remote images loaded without broken placeholders

版本历史

共 1 个版本

  • v0.1.0 当前
    2026-05-02 16:48 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

developer-tools

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 672 📥 324,627
ai-intelligence

Self-Improving + Proactive Agent

ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,363 📥 319,199
security-compliance

Skill Vetter

spclaudehome
AI智能体技能安全预审工具。安装ClawdHub、GitHub等来源技能前,检查风险信号、权限范围及可疑模式。
★ 1,219 📥 266,974