MCPcopy Create free account
hub / github.com/codenameone/CodenameOne / parse_args

Function parse_args

scripts/website/syndicate_browser_posts.py:1114–1131  ·  view source on GitHub ↗
(argv: list[str])

Source from the content-addressed store, hash-verified

1112
1113
1114def parse_args(argv: list[str]) -> argparse.Namespace:
1115 parser = argparse.ArgumentParser(description=__doc__)
1116 parser.add_argument("--platforms", default=DEFAULT_PLATFORMS,
1117 help=f"Comma-separated platforms (default: {DEFAULT_PLATFORMS}).")
1118 parser.add_argument("--dry-run", action="store_true",
1119 help="No browser launched; just print what would happen.")
1120 parser.add_argument("--headed", action="store_true",
1121 help="Run with a visible browser (for local debugging).")
1122 parser.add_argument("--validate-only", action="store_true",
1123 help="Log in and open the editor, then screenshot and exit without submitting.")
1124 parser.add_argument("--today", default=None, help="Override today's date (YYYY-MM-DD).")
1125 parser.add_argument("--floor", default=ELIGIBILITY_FLOOR.isoformat(),
1126 help=f"Posts must be dated strictly after this date (default: {ELIGIBILITY_FLOOR.isoformat()}).")
1127 parser.add_argument("--min-age-days", type=int, default=MIN_AGE_DAYS,
1128 help=f"Minimum post age in days (default: {MIN_AGE_DAYS}).")
1129 parser.add_argument("--blog-dir", default=str(BLOG_DIR))
1130 parser.add_argument("--state-file", default=str(STATE_FILE))
1131 return parser.parse_args(argv)
1132
1133
1134def main(argv: list[str]) -> int:

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected