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

Function main

script/run_paper2ppt_cli.py:335–368  ·  view source on GitHub ↗

Main entry point

()

Source from the content-addressed store, hash-verified

333
334
335def 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
371if __name__ == "__main__":

Callers 1

Calls 7

run_paper2ppt_workflowFunction · 0.85
parse_argsFunction · 0.70
detect_input_typeFunction · 0.70
validate_inputFunction · 0.70
create_output_dirFunction · 0.70
print_resultsFunction · 0.70
runMethod · 0.45

Tested by

no test coverage detected