MCPcopy Create free account
hub / github.com/HzaCode/OneCite / main

Function main

onecite/cli.py:18–38  ·  view source on GitHub ↗

CLI entry point.

()

Source from the content-addressed store, hash-verified

16
17
18def main() -> int:
19 """CLI entry point."""
20 parser = create_parser()
21 args = parser.parse_args()
22
23 try:
24 if args.command == 'process':
25 return process_command(args)
26 elif args.command == 'version':
27 print(f"OneCite version {__version__}")
28 return 0
29 else:
30 parser.print_help()
31 return 1
32
33 except OneCiteError as e:
34 print(f"Error: {e}", file=sys.stderr)
35 return 1
36 except Exception as e:
37 print(f"Processing failed: {e}", file=sys.stderr)
38 return 1
39
40
41def create_parser() -> argparse.ArgumentParser:

Callers 1

cli.pyFile · 0.70

Calls 2

create_parserFunction · 0.85
process_commandFunction · 0.85

Tested by

no test coverage detected