CKAN extension for DCAT-AP Switzerland, templates and different plugins for opendata.swiss.
- CKAN 2.4+
- ckanext-scheming
- ckanext-fluent
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 --mapping-file babel.cfg --output i18n/ckanext-switzerland.pot
Or follow the official CKAN guide at https://github.com/ckan/ckan/wiki/Translations-and-Extensions
All translations are done via Transifex. To compile the po files use the following command:
This extension currently provides one paster 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
To install ckanext-switzerland:
-
Activate your CKAN virtual environment, for example::
. /usr/lib/ckan/default/bin/activate
-
Install the ckanext-switzerland Python package into your virtual environment::
pip install ckanext-switzerland
-
Add
switzerland
to theckan.plugins
setting in your CKAN config file (by default the config file is located at/etc/ckan/default/production.ini
). -
Restart CKAN. For example if you've deployed CKAN with Apache on Ubuntu::
sudo service apache2 reload
This extension uses the following config options (.ini file)
# the URL of the WordPress AJAX interface
ckanext.switzerland.wp_ajax_url = https://opendata.swiss/cms/wp-admin/admin-ajax.php
# piwik config
piwik.site_id = 1
piwik.url = piwik.opendata.swiss
To install ckanext-switzerland for development, activate your CKAN virtualenv and do:
git clone https://github.com/ogdch/ckanext-switzerland.git
cd ckanext-switzerland
python setup.py develop
pip install -r dev-requirements.txt
pip install -r requirements.txt