Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New ckan dcat consume and ckan dcat produce commands #279

Merged
merged 6 commits into from
May 7, 2024
Merged

Conversation

amercader
Copy link
Member

There was an old CLI in processors.py that wasn't very useful as it didn't load the CKAN environment. This migrates it to the ckan dcat command, mainly to consume and produce DCAT RDF serializations. This will be very useful for quickly testing while working on the scheming support.

From the docs:

In both cases the input can be provided as a path to a file:

ckan dcat consume -f ttl examples/dataset.ttl

ckan dcat produce -f jsonld examples/ckan_datasets.json

or be read from stdin:

ckan dcat consume -

The latter form allows chaininig commands for more complex metadata processing, e.g.:

curl https://demo.ckan.org/api/action/package_search | jq .result.results | ckan dcat produce -f jsonld -

For the full list of options check ckan dcat consume --help and ckan dcat produce --help.

@amercader amercader merged commit 48b5e61 into master May 7, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant