MCPcopy Create free account
hub / github.com/OpenDCAI/Paper2Any / main

Function main

script/run_paper2poster_cli.py:287–320  ·  view source on GitHub ↗

Main entry point

()

Source from the content-addressed store, hash-verified

285
286
287def 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
323if __name__ == "__main__":

Callers 1

Calls 7

parse_argsFunction · 0.70
validate_inputFunction · 0.70
create_output_dirFunction · 0.70
print_resultsFunction · 0.70
runMethod · 0.45

Tested by

no test coverage detected