scanny / python-pptx

Create Open XML PowerPoint documents in Python
MIT License
2.28k stars 503 forks source link

Search #879

Open srgb111 opened 1 year ago

srgb111 commented 1 year ago

First - great package! Second, I have a potential use case. I'd like to create a search tool for ppt slides.

python ppt_search.py SearchTerm File1.pptx File2.pptx

The simple version that prints the filename and slide number of slides with text matching the SearchTerm is trivial to write with your package and works well.

However, I would like to have the "found" slides copied into a new presentation SearchTerm.pptx.

Can you comment a bit more on what would be needed to copy a slide from one presentation to another? I've played with it a bit and found the issues w/ respect to element naming, layouts, etc., but if you could point me in the right direction either to some documentation of the format or in your mind what needs to be done, I'd be happy to contribute some code to get a copy slide function in place.