html2pptx

将HTML演示文稿转换为PowerPoint(PPTX)格式。支持frontend-slides生成的HTML,保留结构、样式和内容。触发词:html转pptx、html2pptx、转换ppt、生成pptx

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "html2pptx" with this command: npx skills add liberalchang/html2pptx

HTML to PPTX 转换器

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

使用场景

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

使用方法

基本用法

python src/convert.py <input.html> [output.pptx]

示例

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

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

支持的内容

HTML元素PPTX转换
<section class="slide">幻灯片页
<h1>, <h2>标题
<p>段落文本
<ul>, <ol>, <li>列表
<div class="card">文本框分组
<img>图片(保留路径)
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/         # 示例文件

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Automation

幻灯

创建、读取、编辑PowerPoint文件(.pptx),支持模板编辑、从头创建、格式转换等

Registry SourceRecently Updated
720Profile unavailable
General

Cjl Slides

Create stunning HTML presentations in 24 international design styles with strict design rules. Export to .pptx for PowerPoint editing. ## Design Philosophy -...

Registry SourceRecently Updated
1140Profile unavailable
General

Markdown To Ppt

Convert Markdown to beautiful presentations and slides. 一键将Markdown文档转换为精美PPT幻灯片,支持多种主题风格,适合商务汇报、教学课件、会议演讲。Markdown to PPT, presentation generator, slides ma...

Registry SourceRecently Updated
501Profile unavailable
General

Artifact Deck

Public OpenClaw skill for generating reproducible PPTX decks from project notes, status bullets, and screenshots. Use when the user wants a stakeholder-ready...

Registry SourceRecently Updated
991Profile unavailable