Harvester for the Swiss National Library (SNL) | Read-only mirror of https://github.com/ogdch/ckanext-snl — Bundesamt für Statistik. Issues & pull requests at the source.
  • Python 95.8%
  • Shell 4.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2014-11-12 16:05:27 +01:00
ckanext Skip records with XML syntax errors. 2014-11-12 16:05:27 +01:00
scripts Fix harvester name in daemon script II 2013-09-09 14:08:04 +02:00
.gitignore Add support for adding only new records from any set by using NewBib 2013-08-23 16:13:17 +02:00
.travis.yml Added travis build. 2014-02-17 13:51:04 +01:00
build.sh Added travis build. 2014-02-17 13:51:04 +01:00
LICENSE Update README and add LICENSE 2013-09-14 01:43:16 +02:00
pip-requirements.txt Use multipart uploads to get rid of S3 timeouts 2014-09-15 17:11:47 +02:00
pre-commit.sh Added PEP8 code checker 2013-12-20 18:35:11 +01:00
README.md Added PEP8 code checker 2013-12-20 18:35:11 +01:00
setup.cfg Added PEP8 code checker 2013-12-20 18:35:11 +01:00
setup.py Inital version of harvester (based on ckanext-swisstopo) 2013-08-07 11:52:17 +02:00

ckanext-snl

Harvester for the Swiss National Library (SNL)

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-snl.git#egg=ckanext-snl --src /home/www-data
cd /home/www-data/ckanext-snl
pip install -r pip-requirements.txt
python setup.py develop

Make sure to add snl and snl_harvester 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-snl snl_harvester gather_consumer -c development.ini &
paster --plugin=ckanext-snl snl_harvester fetch_consumer -c development.ini &
paster --plugin=ckanext-snl snl_harvester run -c development.ini

Only harvest files via OAI-PMH:

source /home/www-data/pyenv/bin/activate
cd /home/www-data/pyenv/src/ckan
 
# Export the oai entries for the specified set
# This command harvests the whole dataset and uploads the resulting records.xml to S3
 paster --plugin=ckanext-snl snl export e-diss -c production.ini
  
# Resume export of the oai entries for the specified set
# This command resumes the harvesting of the "sb" set, beginning from record 106500 and it stops at record 1000000
# If you specify an upper limit the files are not uploaded to S3, but are only kept locally.
paster --plugin=ckanext-snl snl resume sb 106500 1000000 -c production.ini