/ckanext-swisstopo

Harvester for the Federal Office of Topography swisstopo

Primary LanguagePythonGNU Affero General Public License v3.0AGPL-3.0

ckanext-swisstopo

Harvester for the Federal Office of Topography swisstopo

Installation

Use pip to install this plugin. This example installs it in /home/www-data

source /home/www-data/pyenv/bin/activate
pip install -e git+https://github.com/ogdch/ckanext-swisstopo.git#egg=ckanext-swisstopo --src /home/www-data
cd /home/www-data/ckanext-swisstopo
pip install -r pip-requirements.txt
python setup.py develop

Make sure to add swisstopo and swisstopo_harvest to ckan.plugins in your config file.

For development

  • install the pre-commit.sh script as a pre-commit hook in your local repositories: ** ln -s ../../pre-commit.sh .git/hooks/pre-commit

Run harvester

source /home/www-data/pyenv/bin/activate
paster --plugin=ckanext-swisstopo swisstopo_harvest gather_consumer -c development.ini &
paster --plugin=ckanext-swisstopo swisstopo_harvest fetch_consumer -c development.ini &
paster --plugin=ckanext-swisstopo swisstopo_harvest run -c development.ini

CSW query:

source /home/www-data/pyenv/bin/activate
# Show output from CSW, 'query' is typically the name of a dataset like 'swissboundaries3D'
paster --plugin=ckanext-swisstopo swisstopo csw <query> -c development.ini