← 返回
未分类 中文

Kai Html Export

Export any HTML file to PPTX or PNG, or publish HTML to a public share URL. Use when the user wants to convert an HTML presentation to PowerPoint, screenshot...
将HTML文件导出为PPTX或PNG格式,或发布为公开分享链接。用于将HTML演示文稿转换为PowerPoint或截图等场景。
kaisersong kaisersong 来源
未分类 clawhub v1.2.0 2 版本 100000 Key: 无需
★ 1
Stars
📥 806
下载
💾 1
安装
2
版本
#latest

概述

kai-html-export

Export any HTML file to PPTX or PNG using a headless browser, or publish it to a public URL. PPTX and PNG export need no Node.js; the optional share helper uses Cloudflare Pages by default and Vercel as a fallback. In hosted cloud sandboxes, automatic sharing is disabled and the helper prints manual-share guidance instead of starting a deploy flow.

Commands

| Command | What it does |

|---------|-------------|

| /kai-html-export [file.html] | Export HTML presentation to PPTX (auto-detects slides) |

| /kai-html-export --pptx [file.html] | Explicit PPTX export |

| /kai-html-export --png [file.html] | Full-page screenshot to PNG |

| /kai-html-export --png --scale 2 [file.html] | 2× resolution screenshot |

| python3 /scripts/share-html.py [file.html|folder] | Publish HTML to a public URL (Cloudflare default) |

| python3 /scripts/share-html.py --provider vercel [file.html|folder] | Publish HTML to a public URL with Vercel |

If no file is specified, use the most recently modified .html file in the current directory.

Export to PPTX

Run the bundled script:

python3 <skill-path>/scripts/export-pptx.py <file.html> [output.pptx] [--mode image|native] [--width 1440] [--height 900]

Export Modes

--mode image (default):

  • Pixel-perfect screenshots of each slide
  • Visual fidelity: ⭐⭐⭐⭐⭐
  • Editability: ❌ None (text is rasterized)
  • Best for: archiving, sharing final presentations

--mode native (new):

  • Editable text, shapes, and tables
  • Visual fidelity: ⭐⭐⭐ (simplified gradients, no shadows)
  • Editability: ✅ Full text editing
  • Best for: collaborative editing, content reuse

Supported in native mode:

  • Text (h1-h6, p): font size, color, bold, alignment
  • Lists (ul, ol): bullet points
  • Tables: editable cells
  • Shapes (div with solid background): rectangles
  • Images: native insertion

Not supported in native mode (fall back to image):

  • CSS gradients → solid color approximation
  • Box shadows → omitted
  • Custom web fonts → system fonts
  • SVG graphics → rasterize to PNG

Export to PNG

Run the bundled script:

python3 <skill-path>/scripts/screenshot.py <file.html> [output.png] [--width 1440] [--scale 2]
  • Captures the full page at the specified width
  • --scale 2 produces a 2× retina-quality image
  • Useful for sharing reports or single-page HTML as images

Share HTML to a public URL

Run the bundled helper:

python3 <skill-path>/scripts/share-html.py <file.html|folder>
python3 <skill-path>/scripts/share-html.py --provider vercel <file.html|folder>
  • Accepts either a single HTML file or a folder containing index.html
  • Copies common relative assets automatically when starting from a single file
  • Uses Cloudflare Pages by default and keeps Vercel as an optional fallback
  • Cloudflare is the recommended default for China-facing links
  • Automatic sharing is disabled in hosted cloud sandboxes; the helper tells the user to share manually from a local machine instead
  • Cloudflare requires wrangler login before first local use
  • Vercel requires npx vercel login before first local use

Dependencies

| Package | Purpose | Install |

|---------|---------|---------|

| playwright | Headless browser screenshots | pip install playwright |

| python-pptx | Assemble screenshots into PPTX | pip install python-pptx |

| Node.js + Wrangler / Vercel CLI | Optional live URL publishing | wrangler login or npx vercel login |

No browser download needed if Chrome, Edge, or Brave is already installed. URL publishing is optional and separate from export.

QA Process

After every native-mode export, assume something looks wrong until proven otherwise:

  1. Preview grid — the export automatically saves {name}-preview.png with thumbnails of slide 1, ~1/3, ~2/3, and last. Open it immediately: open {name}-preview.png
  2. Structural check — if slide count mismatches or any slide is unreadable, the script prints warnings
  3. Open PPTX — for image issues or layout problems, open the PPTX in Keynote/PowerPoint to verify the render
  4. Re-export — if visual quality is wrong, diagnose the root cause in the HTML before re-running

Works with any HTML

Designed to work with output from:

  • kai-slide-creator — HTML presentations with .slide elements
  • kai-report-creator — Single-page HTML reports
  • Any self-contained HTML file

版本历史

共 2 个版本

  • v1.2.0 当前
    2026-05-03 03:52 安全 安全
  • v1.1.7
    2026-03-29 19:40

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

office-efficiency

Excel / XLSX

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

Gog

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

Business Blueprint Skill

kaisersong
用于将售前需求、会议纪要或解决方案材料转化为可编辑的业务能力蓝图、跨职能流程图及应用架构的技能。
★ 0 📥 643