diff --git a/ckanapi/cli/dump.py b/ckanapi/cli/dump.py index b2d2d2b..68a740d 100644 --- a/ckanapi/cli/dump.py +++ b/ckanapi/cli/dump.py @@ -57,7 +57,10 @@ def dump_things(ckan, thing, arguments, }[thing] params = dict( all_fields=False, # for user_list - ) + include_private='--include-private' in arguments, # for package_list + include_drafts='--include-drafts' in arguments, # for package_list + include_deleted='--include-deleted' in arguments, # for package_list + ) names = ckan.call_action(get_thing_list, params) else: diff --git a/ckanapi/cli/main.py b/ckanapi/cli/main.py index 04ce7f5..566d999 100644 --- a/ckanapi/cli/main.py +++ b/ckanapi/cli/main.py @@ -14,7 +14,7 @@ [[-c CONFIG] [-u USER] | -r SITE_URL [-a APIKEY] [--insecure]] ckanapi dump (datasets | groups | organizations | users | related) (ID_OR_NAME ... | --all) ([-O JSONL_OUTPUT] | [-D DIRECTORY]) - [-p PROCESSES] [-dqwzRU] + [-p PROCESSES] [-dqwzRU --include-private --include-drafts --include-deleted] [[-c CONFIG] [-u USER] | -r SITE_URL [-a APIKEY] [-g] [--insecure]] ckanapi load datasets [--upload-resources] [-I JSONL_INPUT] [-s START] [-m MAX] @@ -44,6 +44,9 @@ defaults to $CKAN_INI or development.ini -d --datastore-fields export datastore field information along with resource metadata as datastore_fields lists + --include-private include private datasets in the dump + --include-drafts include draft datasets in the dump + --include-deleted include deleted datasets in the dump -D --datapackages=DIR download resources and output as datapackages in DIR instead of metadata-only json lines -g --get-request use GET instead of POST for API calls