'2025/04/15'에 해당되는 글 1건

  1. 2025.04.15 python read ppx

from pptx import Presentation
import glob
f = open("ppt.txt", 'w', encoding='utf-8')

for eachfile in glob.glob("*.pptx"):
    prs = Presentation(eachfile)
    print(eachfile)
    print("----------------------")
    for slide in prs.slides:
        for shape in slide.shapes:
            if hasattr(shape, "text"):
                print(shape.text)
                f.write(shape.text)


f.close()