Skill for creating professional presentations and analyzing existing PPTX files. Provides code snippets for reading slide content using python-pptx, and design guidance for creating compelling slide decks. Use when the output format includes .pptx or when source documents include .pptx files.
from pptx import Presentation
prs = Presentation('presentation.pptx')
for i, slide in enumerate(prs.slides):
print(f"\n=== Slide {i+1} (layout: {slide.slide_layout.name}) ===")
for shape in slide.shapes:
if shape.has_text_frame:
for para in shape.text_frame.paragraphs:
if para.text.strip():
print(f" {para.text}")
if shape.has_table:
table = shape.table
for row in table.rows:
cells = [cell.text for cell in row.cells]
print(f" | {' | '.join(cells)} |")
from pptx import Presentation
prs = Presentation('presentation.pptx')
for i, slide in enumerate(prs.slides):
if slide.has_notes_slide:
notes = slide.notes_slide.notes_text_frame.text
if notes.strip():
print(f"Slide {i+1} notes: {notes}")
| Type | When to Use |
|---|---|
title | Opening slide — main title + subtitle |
section | Topic transition / divider |
content | Core information with bullets (max 6) |
key_findings | 3-5 most impactful discoveries |
stat_callout | Single metric focus (stat_value + context) |
comparison | Side-by-side: before/after, A vs B |
timeline | Sequential events (4-6 max) |
chart | Data visualization (bar, line, pie, horizontal_bar) |
recommendations | Action items near the end |
closing | Final slide — thank you / next steps |