MCPcopy Create free account
hub / github.com/Paper2Poster/Paper2Poster / save

Method save

demo/Paper2Poster/utils/src/presentation.py:1235–1250  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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 """

Callers 15

generate_slidesFunction · 0.95
__init__Method · 0.45
draw_table_and_cellsMethod · 0.45
__call__Method · 0.45
__call__Method · 0.45
_annotate_imagesMethod · 0.45
draw_text_boxesMethod · 0.45
pipeline.pyFile · 0.45

Calls 4

clear_slidesMethod · 0.95
clear_imagesMethod · 0.95
build_slideMethod · 0.95
clear_textMethod · 0.95

Tested by

no test coverage detected