aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md5
-rwxr-xr-xckandumper7
2 files changed, 8 insertions, 4 deletions
diff --git a/README.md b/README.md
index 4639f51..c549556 100644
--- a/README.md
+++ b/README.md
@@ -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
diff --git a/ckandumper b/ckandumper
index a371220..400fc61 100755
--- a/ckandumper
+++ b/ckandumper
@@ -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')