Skip to content

Instantly share code, notes, and snippets.

@ygkn
Created January 23, 2022 06:38
Show Gist options
  • Save ygkn/fddca2defe33362c7d13ab71f3d0cd56 to your computer and use it in GitHub Desktop.
Save ygkn/fddca2defe33362c7d13ab71f3d0cd56 to your computer and use it in GitHub Desktop.
from pptx import Presentation
from pptx.shapes.autoshape import Shape
from pptx.enum.dml import MSO_LINE
from os import listdir, path
source = path.join(".", "source")
dist = path.join(".", "dist")
for file in listdir(source):
prs = Presentation(path.join(source, file))
for slide in prs.slides:
for shape in slide.shapes:
if isinstance(shape, Shape):
shape.fill.background()
prs.save(path.join(dist, file))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment