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

Function pptx2images

utils/src/experiment/experiments.py:154–176  ·  view source on GitHub ↗
(settings: str = "*")

Source from the content-addressed store, hash-verified

152
153
154def pptx2images(settings: str = "*"):
155 while True:
156 for folder in glob(f"data/*/pptx/*/{settings}/*/history"):
157 folder = os.path.dirname(folder)
158 pptx = pjoin(folder, "final.pptx")
159 ppt_folder, setting, pdf = folder.rsplit("/", 2)
160 dst = pjoin(ppt_folder, "final_images", setting, pdf)
161
162 if not pexists(pptx):
163 if pexists(dst):
164 print(f"remove {dst}")
165 shutil.rmtree(dst)
166 continue
167
168 older_than(pptx)
169 if pexists(dst):
170 continue
171 try:
172 ppt_to_images(pptx, dst)
173 except:
174 print("pptx to images failed")
175 sleep(60)
176 print("keep scanning for new pptx")
177
178
179if __name__ == "__main__":

Callers

nothing calls this directly

Calls 2

older_thanFunction · 0.90
ppt_to_imagesFunction · 0.90

Tested by

no test coverage detected