Main entry point
()
| 333 | |
| 334 | |
| 335 | def main(): |
| 336 | """Main entry point""" |
| 337 | try: |
| 338 | # Parse arguments |
| 339 | args = parse_args() |
| 340 | |
| 341 | # Auto-detect input type if not specified |
| 342 | input_type = args.input_type or detect_input_type(args.input) |
| 343 | |
| 344 | # Validate input |
| 345 | input_content, input_type = validate_input(args.input, input_type) |
| 346 | |
| 347 | # Create output directory |
| 348 | output_dir = create_output_dir(args) |
| 349 | |
| 350 | # Run workflow |
| 351 | final_state = asyncio.run(run_paper2ppt_workflow(args, input_content, input_type, output_dir)) |
| 352 | |
| 353 | # Print results |
| 354 | print_results(final_state, output_dir) |
| 355 | |
| 356 | return 0 |
| 357 | |
| 358 | except FileNotFoundError as e: |
| 359 | log.error("%s", e) |
| 360 | return 1 |
| 361 | except ValueError as e: |
| 362 | log.error("%s", e) |
| 363 | return 1 |
| 364 | except Exception as e: |
| 365 | log.exception("Workflow execution failed: %s", e) |
| 366 | import traceback |
| 367 | traceback.print_exc() |
| 368 | return 1 |
| 369 | |
| 370 | |
| 371 | if __name__ == "__main__": |
no test coverage detected