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
Update translations
To generate a new ckanext-switzerland.pot file use the following command:
vagrant ssh
source /home/vagrant/pyenv/bin/activate
cd /var/www/ckanext/ckanext-switzerland/
python setup.py extract_messages
Or follow the official CKAN guide at https://docs.ckan.org/en/latest/extensions/translating-extensions.html
All translations are done via Transifex. To compile the po files use the following command:
python setup.py compile_catalog
Command
This extension currently provides two paster commands:
Command to cleanup the datastore database.
Datastore currently does not delete tables when the corresponding resource is deleted.
This command finds these orphaned tables and deletes its rows to free the space in the database.
It is meant to be run regularly by a cronjob.
paster --plugin=ckanext-switzerland ogdch cleanup_datastore -c /var/www/ckan/development.ini
Command to cleanup the harvest jobs.
This commands deletes the harvest jobs and objects per source and overall leaving only the latest n,
where n and the source are optional arguments. The command is supposed to be used in a cron job to
provide for a regular cleanup of harvest jobs, so that the database is not overloaded with unneeded data
of past job runs. It has a dryrun option so that it can be tested what will get be deleted in the
database before the actual database changes are performed.
paster --plugin=ckanext-switzerland ogdch cleanup_harvestjobs [{source_id}] [--keep={n}}] [--dryrun] -c /var/www/ckan/development.ini
Harvesters
Swiss Dcat