← Back to Skills Marketplace
liberalchang

html2pptx

by chang · GitHub ↗ · v3.0.0 · MIT-0
cross-platform ⚠ suspicious
68
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install html2pptx
Description
将HTML演示文稿转换为PowerPoint(PPTX)格式。支持frontend-slides生成的HTML,保留结构、样式和内容。触发词:html转pptx、html2pptx、转换ppt、生成pptx
README (SKILL.md)

HTML to PPTX 转换器

将HTML演示文稿(特别是frontend-slides生成的)转换为原生PowerPoint(.pptx)文件。

使用场景

  • 将frontend-slides生成的HTML演示文稿转换为可编辑的PPT
  • 保留幻灯片结构、文字内容和基本样式
  • 批量转换多个HTML文件

使用方法

基本用法

python src/convert.py \x3Cinput.html> [output.pptx]

示例

# 转换单个文件
python src/convert.py presentation.html

# 指定输出路径
python src/convert.py presentation.html ~/Documents/output.pptx

支持的内容

HTML元素 PPTX转换
\x3Csection class="slide"> 幻灯片页
\x3Ch1>, \x3Ch2> 标题
\x3Cp> 段落文本
\x3Cul>, \x3Col>, \x3Cli> 列表
\x3Cdiv class="card"> 文本框分组
\x3Cimg> 图片(保留路径)
CSS颜色 尝试匹配主题色

转换流程

  1. 解析HTML - 使用BeautifulSoup提取slide结构
  2. 分析样式 - 提取CSS颜色、字体信息
  3. 创建PPTX - 使用python-pptx生成幻灯片
  4. 映射内容 - 将HTML元素映射到PPTX形状
  5. 保存文件 - 输出.pptx文件

限制说明

  • 复杂CSS动画无法转换
  • 渐变背景转为纯色
  • 自定义字体可能丢失
  • 绝对定位元素需要手动调整

依赖安装

pip install python-pptx beautifulsoup4 lxml

文件结构

html2pptx/
├── SKILL.md          # 本文件
├── src/
│   └── convert.py    # 主转换脚本
└── examples/         # 示例文件
Usage Guidance
This package appears to implement an HTML→PPTX converter in Python, which matches the SKILL.md. However, there are multiple packaging inconsistencies: README and tests reference different filenames/modules than the actual src/convert.py file, and Node package files (package.json, package-lock.json) are present though not needed. Before installing or invoking this skill you should: 1) inspect src/convert.py fully to confirm there are no network calls or subprocess/spawned installs; 2) run the code in an isolated environment (a disposable Python venv or sandbox) and run the included tests to see failures and understand expected inputs; 3) avoid running npm install unless you understand why Node deps are present; 4) ask the author/source for clarification (why Node files exist, and why tests/README reference different filenames). These inconsistencies are likely packaging sloppiness but warrant caution — treat as suspicious until the provenance and structure are clarified.
Capability Assessment
Purpose & Capability
The code (src/convert.py) and SKILL.md describe a Python-based HTML→PPTX converter using BeautifulSoup and python-pptx, which is coherent with the skill description. However, the repository also includes Node artifacts (package.json, package-lock.json with pptxgenjs) that are unrelated to the declared Python implementation — this is disproportionate and likely a leftover or copy/paste from another project.
Instruction Scope
SKILL.md instructions are narrowly scoped (parse HTML slides, map to PPTX, save file) and require only the declared Python libs. There is no instruction to read unrelated system files or credentials. But tests and README reference different module/file names (tests import src.converter; README lists src/main.py, converter.py, venv_manager.py, etc.) which is inconsistent with the actual file layout and could cause confusion or unexpected behavior when an agent follows the instructions.
Install Mechanism
There is no install spec (instruction-only), which is low risk. Still, presence of package.json and package-lock.json (Node dependencies) is unnecessary for a Python-only runtime and could entice someone to run npm install — bringing in unrelated packages. No download-from-URL or other high-risk install mechanism is present.
Credentials
The skill requests no environment variables, no credentials, and no config paths. The declared Python dependencies (python-pptx, beautifulsoup4, lxml/html5lib) are proportionate to the stated task.
Persistence & Privilege
The skill is not always-enabled and does not request elevated persistence or modification of other skills. Autonomous invocation (default) is allowed but not combined with other red flags.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install html2pptx
  3. After installation, invoke the skill by name or use /html2pptx
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v3.0.0
html2pptx 3.0.0 发布说明 - 支持将frontend-slides生成的HTML演示文稿结构完整转换为PPTX格式 - 映射幻灯片结构、文本、列表、图片和基本样式(如CSS颜色) - 保留HTML中的分组、分节等到PPTX页面级别 - 提供命令行工具,支持单文件和批量转换 - 明确了转换过程、支持内容及转换限制
Metadata
Slug html2pptx
Version 3.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is html2pptx?

将HTML演示文稿转换为PowerPoint(PPTX)格式。支持frontend-slides生成的HTML,保留结构、样式和内容。触发词:html转pptx、html2pptx、转换ppt、生成pptx. It is an AI Agent Skill for Claude Code / OpenClaw, with 68 downloads so far.

How do I install html2pptx?

Run "/install html2pptx" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is html2pptx free?

Yes, html2pptx is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does html2pptx support?

html2pptx is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created html2pptx?

It is built and maintained by chang (@liberalchang); the current version is v3.0.0.

💬 Comments