Main entry point
()
| 256 | |
| 257 | |
| 258 | def main(): |
| 259 | """Main entry point""" |
| 260 | try: |
| 261 | # Parse arguments |
| 262 | args = parse_args() |
| 263 | |
| 264 | # Validate input file |
| 265 | input_path = validate_input_file(args.input) |
| 266 | |
| 267 | # Create output directory |
| 268 | output_dir = create_output_dir(args) |
| 269 | |
| 270 | # Run workflow |
| 271 | final_state = asyncio.run(run_pdf2ppt_workflow(args, input_path, output_dir)) |
| 272 | |
| 273 | # Print results |
| 274 | print_results(final_state, output_dir) |
| 275 | |
| 276 | return 0 |
| 277 | |
| 278 | except FileNotFoundError as e: |
| 279 | log.error("%s", e) |
| 280 | return 1 |
| 281 | except ValueError as e: |
| 282 | log.error("%s", e) |
| 283 | return 1 |
| 284 | except Exception as e: |
| 285 | log.exception("Workflow execution failed: %s", e) |
| 286 | import traceback |
| 287 | traceback.print_exc() |
| 288 | return 1 |
| 289 | |
| 290 | |
| 291 | if __name__ == "__main__": |
no test coverage detected