diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2019-05-17 10:00:20 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2019-05-17 10:00:20 -0300 |
commit | 7873814e1433b64eef674a993359a58cee52f131 (patch) | |
tree | 6bc8cc6f13c999d9c65fc59537844a1c805cfbf1 | |
parent | 94467dd41a26b8f9a03ce6f195ca3f71bfe7e13a (diff) | |
download | ckandumper-7873814e1433b64eef674a993359a58cee52f131.tar.gz ckandumper-7873814e1433b64eef674a993359a58cee52f131.tar.bz2 |
Move examples into help option
-rw-r--r-- | README.md | 5 | ||||
-rwxr-xr-x | ckandumper | 7 |
2 files changed, 8 insertions, 4 deletions
@@ -8,7 +8,6 @@ Works on python 3.7 with the following dependencies met: apt install wget python3-tqdm -## Examples +## Usage - ckandumper --limit-concurrent=10 --limit-rate=100k --randomize https://opendata.swiss/en/ switzerland/ - ckandumper --limit-concurrent=10 --limit-rate=100k --randomize https://open.canada.ca/data/en/ canada/ + ckandumper --help @@ -321,7 +321,12 @@ class CkanDumper: if __name__ == "__main__": # Parse CLI - parser = argparse.ArgumentParser(description='Dump CKAN metadata and datasets.') + examples = """ Examples: + + ckandumper --limit-concurrent=10 --limit-rate=100k --randomize https://open.canada.ca/data/en/ canada/ + ckandumper --limit-concurrent=10 --limit-rate=100k --randomize https://opendata.swiss/en/ switzerland/ + """ + parser = argparse.ArgumentParser(description='Dump CKAN metadata and datasets.', epilog=examples, formatter_class=argparse.RawDescriptionHelpFormatter,) parser.add_argument('url', nargs='+', help='CKAN instance URL') parser.add_argument('dest', nargs='+', help='Destination folder') parser.add_argument('--limit-rate', help='Limit the download speed to amount bytes per second, per download') |