diff options
author | Martin Fischer <martin@push-f.com> | 2025-03-09 11:13:20 +0100 |
---|---|---|
committer | Martin Fischer <martin@push-f.com> | 2025-03-09 11:13:20 +0100 |
commit | 42c737aa1a7731170e8369482f96b557a1bd7a36 (patch) | |
tree | 46e9555760dc8d9f688dcaf47b7f44d3945629db /proposals.py | |
parent | 85e2cea63af8300af62575d3a7d4b0458cca53f6 (diff) |
feat: make scripts support --help
Diffstat (limited to 'proposals.py')
-rwxr-xr-x | proposals.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/proposals.py b/proposals.py index 92f1c28..e16412f 100755 --- a/proposals.py +++ b/proposals.py @@ -1,4 +1,6 @@ #!/usr/bin/env python3 +"""Queries wiki.openstreetmap.org for proposals and outputs a JSON list of them to stdout.""" +import argparse import html import json import sys @@ -14,6 +16,9 @@ OSMWIKI_ENDPOINT = 'https://wiki.openstreetmap.org/w/api.php' def run(): + arg_parser = argparse.ArgumentParser(description=__doc__) + arg_parser.parse_args() + res = requests.get( OSMWIKI_ENDPOINT, params=dict( |