summaryrefslogtreecommitdiffstats
path: root/python/fatcat_ingest.py
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-12-11 16:57:18 -0800
committerBryan Newbold <bnewbold@robocracy.org>2019-12-11 16:57:21 -0800
commit44a3f1286a81ad5565a925b766124f05165c492f (patch)
tree86b77bd627334c658bfe0946eecb6656befe7e50 /python/fatcat_ingest.py
parent4c716f9e39046fde3e98a3686a5f086f3d53315a (diff)
downloadfatcat-44a3f1286a81ad5565a925b766124f05165c492f.tar.gz
fatcat-44a3f1286a81ad5565a925b766124f05165c492f.zip
improve argparse usage
--fatcat-api-url is clearer than --host-url remove unimplemented --debug (copy/paste from webface argparse) use formater which will display 'default' parameters with --help Thanks to Martin for pointing out the later, which i've always wanted!
Diffstat (limited to 'python/fatcat_ingest.py')
-rwxr-xr-xpython/fatcat_ingest.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/python/fatcat_ingest.py b/python/fatcat_ingest.py
index 05b7e848..46f46536 100755
--- a/python/fatcat_ingest.py
+++ b/python/fatcat_ingest.py
@@ -91,11 +91,9 @@ def run_ingest_container(args):
print(counts, file=sys.stderr)
def main():
- parser = argparse.ArgumentParser()
- parser.add_argument('--debug',
- action='store_true',
- help="enable debugging interface")
- parser.add_argument('--host-url',
+ parser = argparse.ArgumentParser(
+ formatter_class=argparse.ArgumentDefaultsHelpFormatter)
+ parser.add_argument('--fatcat-api-url',
default="http://localhost:9411/v0",
help="connect to this host/port")
parser.add_argument('--enqueue-kafka',
@@ -129,7 +127,7 @@ def main():
print("tell me what to do!")
sys.exit(-1)
- args.api = public_api(args.host_url)
+ args.api = public_api(args.fatcat_api_url)
args.func(args)
if __name__ == '__main__':