微算力 · API 导航与自营网关
API 接入 EN
未登录登录
📊

文档秒变专业演示文稿

Doc2slides · v3.5.3
效率 安全 A 级 作者 lifei68801 公开目录收录
1.1k 下载 0 安装 5.1k 收藏 4 浏览

简介

一键将PDF、Word、Markdown文档转换为18+布局的专业PPT,支持智能布局匹配和可选AI增强,离线可用。

原始描述

One-click PDF/Word/Markdown to designer-grade PPT. AI auto-layout + 18 slide types + built-in charts. Local-first, free. Use when: user wants to create slide...

通过你的 Agent 添加

安装目录:doc2slides/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。

点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。

或者手动安装

Claude Code~/.claude/skills/doc2slides/
Codex CLI~/.codex/skills/doc2slides/
DeepSeek Harness~/.agents/skills/doc2slides/

包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可; 目录名不用换,也不要把包直接解压到 skills 根目录。 技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。

技能正文


name: doc2slides version: 3.5.3 description: "Convert PDF, Word, and Markdown documents into professional PowerPoint slides with 18+ layout types and smart layout matching. Use when: user wants to create slides from a document or convert content to PPT." license: MIT-0 author: lifei68801 metadata: openclaw: requires: bins: ["python3", "pip3"] env: optional: - OPENAI_API_KEY - ZHIPU_API_KEY - DEEPSEEK_API_KEY permissions: - "file:read" - "file:write" behavior: modifiesLocalFiles: true network: optional telemetry: none credentials: none

Doc2Slides

Got a PDF or document? Need a presentation? One command, done.

Input: any PDF / DOCX / Markdown Output: 6-page professional PPT in minutes

Cover | Dashboard | Timeline | Comparison | Pyramid | Summary

Quick Start

# Install the skill first
clawhub install doc2slides

# Then install Python dependencies
pip3 install python-pptx playwright requests && playwright install chromium

# Generate slides
cd ~/.openclaw/workspace/skills/doc2slides/scripts
python3 workflow.py --input document.pdf --output slides.pptx

That's it. PDF → PPT in minutes.

What You Get

Feature Details
Layouts 18+ types: Dashboard, Timeline, Flow Chart, Pyramid, Comparison, Matrix...
Smart Matching Auto-picks the best layout per section
Charts Built-in SVG charts — pie, bar, line, progress rings
Resolution 3x high-def rendering
LLM Mode Optional AI analysis for smarter layout choices
Input PDF, DOCX, Markdown
Offline Works without internet (template mode)

Usage Examples

# Basic — 5 slides from PDF
python3 workflow.py --input report.pdf --output report.pptx

# With page limit
python3 workflow.py --input report.pdf --output report.pptx --pages 3

# With custom instruction (style, focus, etc.)
python3 workflow.py --input report.pdf --output report.pptx --instruction "Focus on data and charts"

# Markdown input
python3 workflow.py --input notes.md --output notes.pptx

When to Use This Skill

Activate when the user says anything like:

  • "把这个文档做成PPT"
  • "Convert this PDF to slides"
  • "Generate a presentation from..."
  • "帮我做个演示文稿"

Before generating, ask: "有什么特殊要求吗?风格、页数、重点内容、配色?也可以说'按默认来'。"

How It Works

Document → Analyze → Match Layouts → Build HTML → Render (3x) → PPTX

No external CDN. No cloud service. Everything runs locally. HTML + inline CSS + SVG charts — fully self-contained.

LLM Enhancement (Optional)

Set one of these env vars to enable AI-powered layout decisions:

Variable Provider
OPENAI_API_KEY OpenAI / compatible
ZHIPU_API_KEY Zhipu AI
DEEPSEEK_API_KEY DeepSeek

No API key? No problem — falls back to template mode with zero network calls.

Architecture

Script Role
workflow.py Main orchestrator
llm_generate_html.py AI slide generation
llm_adapter.py Multi-provider adapter
smart_layout_matcher.py Auto layout selection
svg_charts.py Chart rendering
html2png_batch.py Screenshot pipeline
png2pptx.py Image → PPTX assembly

All source code included. MIT-0 license.

正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。

标签

文档转换ppt生成pdf处理markdown自动化办公presentationpython

同类 Skill