Main entry point
()
| 285 | |
| 286 | |
| 287 | def main(): |
| 288 | """Main entry point""" |
| 289 | try: |
| 290 | # Parse arguments |
| 291 | args = parse_args() |
| 292 | |
| 293 | # Validate input |
| 294 | input_path = validate_input(args.input) |
| 295 | |
| 296 | # Validate poster dimensions |
| 297 | width, height = validate_poster_dimensions(args.poster_width, args.poster_height) |
| 298 | |
| 299 | # Create output directory |
| 300 | output_dir = create_output_dir(args) |
| 301 | |
| 302 | # Run workflow |
| 303 | final_state = asyncio.run(run_paper2poster_workflow(args, input_path, output_dir)) |
| 304 | |
| 305 | # Print results |
| 306 | print_results(final_state, output_dir) |
| 307 | |
| 308 | return 0 |
| 309 | |
| 310 | except FileNotFoundError as e: |
| 311 | log.error("%s", e) |
| 312 | return 1 |
| 313 | except ValueError as e: |
| 314 | log.error("%s", e) |
| 315 | return 1 |
| 316 | except Exception as e: |
| 317 | log.exception("Workflow execution failed: %s", e) |
| 318 | import traceback |
| 319 | traceback.print_exc() |
| 320 | return 1 |
| 321 | |
| 322 | |
| 323 | if __name__ == "__main__": |
no test coverage detected