MCPcopy Index your code
hub / github.com/zer0yu/CyberSecurityRSS / parse_args

Function parse_args

scripts/add_feed_to_tiny.py:465–481  ·  view source on GitHub ↗
(argv: Optional[List[str]] = None)

Source from the content-addressed store, hash-verified

463
464
465def parse_args(argv: Optional[List[str]] = None) -> argparse.Namespace:
466 parser = argparse.ArgumentParser(description="Add one RSS/Atom feed into tiny.opml.")
467 parser.add_argument("--tiny", default="tiny.opml", help="Path to tiny.opml")
468 parser.add_argument("--url", help="RSS/Atom URL; interactive prompt if omitted")
469 parser.add_argument("--category", help="Target category; interactive prompt if omitted")
470 parser.add_argument("--timeout", type=float, default=12, help="HTTP timeout in seconds")
471 parser.add_argument(
472 "--update",
473 action="store_true",
474 help="Update existing feed if URL already exists (title, htmlUrl, and category)",
475 )
476 parser.add_argument(
477 "--no-git-pull",
478 action="store_true",
479 help="Skip the startup git pull --ff-only step",
480 )
481 return parser.parse_args(argv)
482
483
484def main(argv: Optional[List[str]] = None) -> int:

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected