Save the presentation to a file. Args: file_path (str): The file path to save the presentation. layout_only (bool): Whether to save only the layout for slide clustering.
(self, file_path, layout_only=False)
| 1233 | ) |
| 1234 | |
| 1235 | def save(self, file_path, layout_only=False): |
| 1236 | """ |
| 1237 | Save the presentation to a file. |
| 1238 | |
| 1239 | Args: |
| 1240 | file_path (str): The file path to save the presentation. |
| 1241 | layout_only (bool): Whether to save only the layout for slide clustering. |
| 1242 | """ |
| 1243 | self.clear_slides() |
| 1244 | for slide in self.slides: |
| 1245 | if layout_only: |
| 1246 | self.clear_images(slide.shapes) |
| 1247 | pptx_slide = self.build_slide(slide) |
| 1248 | if layout_only: |
| 1249 | self.clear_text(pptx_slide.shapes) |
| 1250 | self.prs.save(file_path) |
| 1251 | |
| 1252 | def build_slide(self, slide: SlidePage) -> PPTXSlide: |
| 1253 | """ |
no test coverage detected