ppt-to-slides

star 2

将 PPT 分页转换为 PNG 图片和 Markdown 文字稿(包含演讲者备注)。使用场景:处理 PPT 演示文稿,提取每页内容和演讲者备注为独立文件。

ninehills By ninehills schedule Updated 1/13/2026

name: ppt-to-slides description: 将 PPT 分页转换为 PNG 图片和 Markdown 文字稿(包含演讲者备注)。使用场景:处理 PPT 演示文稿,提取每页内容和演讲者备注为独立文件。

PPT 转幻灯片

快速开始

将 PPTX 文件转换为 PNG 图片和 Markdown 文字稿:

# 环境检查和转换(相对目录)
python scripts/extract_ppt.py <pptx_path> <output_dir>

# PPTX 转 PDF
soffice --headless --convert-to pdf <pptx_path> --outdir <output_dir>

# PDF 转 PNG
pdftoppm -png -r 150 <pdf_path> <output_dir>/slide

依赖检查

使用 skill 前必须检查以下依赖:

依赖 检查命令 安装命令 (macOS) 安装命令 (Linux)
python-pptx uv pip show python-pptx uv pip install python-pptx uv pip install python-pptx
LibreOffice which soffice brew install --cask libreoffice apt-get install libreoffice
poppler which pdftoppm brew install poppler apt-get install poppler-utils

输出文件

  • output_dir/slide-xx.png: 每页 PNG 图片
  • output_dir/slide-xx.md: 每页 Markdown 文字稿(含演讲者备注)

脚本说明

extract_ppt.py

提取 PPT 文本和演讲者备注为 Markdown 文件:

python scripts/extract_ppt.py <pptx_path> <output_dir>

此脚本会自动检查依赖,未安装时提示用户。

Install via CLI
npx skills add https://github.com/ninehills/ppt-tts-script --skill ppt-to-slides
Repository Details
star Stars 2
call_split Forks 0
navigation Branch main
article Path SKILL.md
More from Creator