返回顶部
k

kai-html-export

>-

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.2.0
安全检测
已通过
351
下载量
1
收藏
概述
安装方式
版本历史

kai-html-export

# 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 <skill-path>/scripts/share-html.py [file.html|folder]` | Publish HTML to a public URL (Cloudflare default) | | `python3 <skill-path>/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: ```bash 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: ```bash 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: ```bash 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

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 kai-html-export-1776364806 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 kai-html-export-1776364806 技能

通过命令行安装

skillhub install kai-html-export-1776364806

下载 Zip 包

⬇ 下载 kai-html-export v1.2.0

文件大小: 69.06 KB | 发布时间: 2026-4-17 15:09

v1.2.0 最新 2026-4-17 15:09
Added Cloudflare-first HTML sharing via share-html.py, kept Vercel fallback, and disabled auto-share in hosted sandboxes.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部