设计与多媒体

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...

它能做什么

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 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

相关技能

Convert Markdown text to DOCX, PPTX, XLSX, PDF, PNG, SVG, HTML, IPYNB, MD, CSV, JSON, JSONL, XML files, and extract code blocks in Markdown to Python, Bash,JS and etc files.

86 次安装3 星标

Convert Markdown heading outlines into themed KMind mind maps. Export PNG or SVG images with theme presets, layouts, edge routes, dark mode, and rainbow bran...

32 次安装1 星标

Professional markdown rendering, export, and publishing via MCP. Use when user asks to "render markdown", "export to PDF", "convert to DOCX", "create a document", "publish a document", "share a link", "make a slide deck", "diff two markdown files", "export to HTML", "create a shareable document", "sync docs from GitHub", or "generate an image of this markdown". Do NOT use for simple markdown editing, code generation, or general writing that doesn't need styled output.

27 次安装

让 Markdown 在 GitHub、MDX、Pandoc、文档站、Slack、Notion 等解析器中正确渲染,并定位修复具体损坏位置。

296 次安装7 星标

Render text into an image and return a temporary local image file path, with optional data URI. Use when Clawhub or Codex needs to convert plain text, styled...

35 次安装

Export Grok conversations from X (x.com) via browser-network capture and convert them into Obsidian-ready Markdown files. Use when a user wants to back up Grok chat history, preserve User vs Grok turns, and generate Markdown notes with YAML frontmatter (URL, created) from captured JSON.

29 次安装