Skip to content

Instantly share code, notes, and snippets.

@eruffaldi
Created September 7, 2023 14:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eruffaldi/23acfda00a0b9277b8365ce55a653376 to your computer and use it in GitHub Desktop.
Save eruffaldi/23acfda00a0b9277b8365ce55a653376 to your computer and use it in GitHub Desktop.
Exports PPTX to TXT
# EXCLUDES Comments
from pptx import Presentation
import sys
prs = Presentation(sys.argv[1])
for i,slide in enumerate(prs.slides):
print("---------------------- Slide %d" % (i+1))
for shape in slide.shapes:
if hasattr(shape, "text"):
print(shape.text)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment