Print workflow results
(final_state: Paper2PPTResponse, output_dir: Path)
| 231 | |
| 232 | |
| 233 | def print_results(final_state: Paper2PPTResponse, output_dir: Path): |
| 234 | """Print workflow results""" |
| 235 | log.info("%s", "=" * 60) |
| 236 | log.info("Image2PPT Workflow Completed Successfully") |
| 237 | log.info("%s", "=" * 60) |
| 238 | log.info("Output Directory: %s", output_dir) |
| 239 | |
| 240 | ppt_path = final_state.ppt_pptx_path |
| 241 | if ppt_path and os.path.exists(ppt_path): |
| 242 | log.info("PPT File: %s", ppt_path) |
| 243 | else: |
| 244 | ppt_candidates = sorted(output_dir.rglob("*.pptx")) + sorted(output_dir.rglob("*.ppt")) |
| 245 | if ppt_candidates: |
| 246 | log.info("PPT File: %s", ppt_candidates[0]) |
| 247 | else: |
| 248 | log.warning("PPT file not found in output") |
| 249 | |
| 250 | log.info("%s", "=" * 60) |
| 251 | |
| 252 | |
| 253 | def main(): |