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