← 返回 Skills 市场
liberalchang

html2pptx

作者 chang · GitHub ↗ · v3.0.0 · MIT-0
cross-platform ⚠ suspicious
68
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install html2pptx
功能描述
将HTML演示文稿转换为PowerPoint(PPTX)格式。支持frontend-slides生成的HTML,保留结构、样式和内容。触发词:html转pptx、html2pptx、转换ppt、生成pptx
使用说明 (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/         # 示例文件
安全使用建议
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.
能力评估
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.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install html2pptx
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /html2pptx 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v3.0.0
html2pptx 3.0.0 发布说明 - 支持将frontend-slides生成的HTML演示文稿结构完整转换为PPTX格式 - 映射幻灯片结构、文本、列表、图片和基本样式(如CSS颜色) - 保留HTML中的分组、分节等到PPTX页面级别 - 提供命令行工具,支持单文件和批量转换 - 明确了转换过程、支持内容及转换限制
元数据
Slug html2pptx
版本 3.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

html2pptx 是什么?

将HTML演示文稿转换为PowerPoint(PPTX)格式。支持frontend-slides生成的HTML,保留结构、样式和内容。触发词:html转pptx、html2pptx、转换ppt、生成pptx. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 68 次。

如何安装 html2pptx?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install html2pptx」即可一键安装,无需额外配置。

html2pptx 是免费的吗?

是的,html2pptx 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

html2pptx 支持哪些平台?

html2pptx 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 html2pptx?

由 chang(@liberalchang)开发并维护,当前版本 v3.0.0。

💬 留言讨论