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

Method save

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
pil_to_data_uriFunction · 0.45
image_memory_sizeFunction · 0.45
qwen2_vl_pplFunction · 0.45
png_to_optimized_jpegFunction · 0.45
open_folder_imagesFunction · 0.45
ensure_under_limit_pilFunction · 0.45
png_to_pdfFunction · 0.45
gen_eval_markdownFunction · 0.45
crop_imageFunction · 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