ckanext-switzerland
CKAN extension for DCAT-AP Switzerland, templates and different plugins for opendata.swiss.
This extension is deprecated. See https://github.com/opendata-swiss/ckanext-switzerland-ng for the current code.
Requirements
- CKAN 2.6+
- ckanext-scheming
- ckanext-fluent
Installation
- Activate your CKAN virtual environment
- Install the ckanext-switzerland Python package:
pip install ckanext-switzerland
- Add
switzerland to the ckan.plugins setting
- Restart CKAN
Config Settings
ckanext.switzerland.wp_ajax_url = https://opendata.swiss/cms/wp-admin/admin-ajax.php
ckanext.switzerland.number_harvest_jobs_per_source = 2
piwik.site_id = 1
piwik.url = piwik.opendata.swiss
Commands
Cleanup Datastore Database
Datastore currently does not delete tables when the corresponding resource is deleted. This command finds orphaned tables and deletes rows to free space.
paster --plugin=ckanext-switzerland ogdch cleanup_datastore -c /var/www/ckan/development.ini
Cleanup Harvest Jobs
Deletes harvest jobs and objects per source leaving only the latest n.
paster --plugin=ckanext-switzerland ogdch cleanup_harvestjobs [{source_id}] [--keep={n}] [--dryrun] -c /var/www/ckan/development.ini
Harvesters
Swiss Dcat Harvester
Implements a Swiss version of the Dcat Harvester.
SHACL Validation
Validation using Apache Jena SHACL against shape graphs.
ckanext.switzerland.shacl_command_path = /opt/apache-jena-3.13.1/bin/shacl
ckanext.switzerland.shacl_results_path = /home/liipadmin/shaclresults
ckanext.switzerland.shacl_shapes_path = /home/liipadmin/shaclshapes
Update Format-Mapping
Edit the mapping.yaml following YAML syntax.
Update Translations
python setup.py extract_messages
python setup.py compile_catalog
License
AGPL-3.0