Pptx
PowerPoint 创建、编辑与分析流程,覆盖布局、备注与样式抽取。
来源:基于 anthropics/skills(MIT)内容改写。
概览
.pptx 也是 OOXML ZIP 包。不同任务选择不同路径:
- 阅读/分析:先抽取文本或解析 XML
- 新建演示:使用 html2pptx 生成
- 编辑现有:解包后修改 XML 再打包
读取与分析
文本抽取
python -m markitdown path-to-file.pptx解析 XML
python ooxml/scripts/unpack.py <office_file> <output_dir>关键结构:
ppt/presentation.xmlppt/slides/slide{N}.xmlppt/notesSlides/notesSlide{N}.xmlppt/slideLayouts//ppt/slideMasters/ppt/theme/
设计复刻要点
当需要模仿既有风格时:先读取 ppt/theme/theme1.xml 的颜色与字体,再抽样检查 slide*.xml 的实际使用。
新建演示(无模板)
- 使用
html2pptx(参考html2pptx.md) - 先说明设计策略,再写代码
- 仅使用 web-safe 字体(Arial/Helvetica/Times/Georgia 等)
- 保证层级、对比度与一致性
编辑现有演示
- 解包 → 修改 XML → 打包
- 复杂格式用
ooxml.md与脚本为准
参考资料
html2pptx.mdooxml.md
claudeskills文档