A PyBossa plugin for Z39.50 integration.
Python
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
pybossa_z3950
tests
.gitignore
.travis.yml
CONTRIBUTING.md
LICENSE
README.md
settings_test.py
setup.cfg
setup.py

README.md

pybossa-z3950

Build Status Coverage Status

A PyBossa plugin that uses Flask-Z3950 to provide Z39.50 integration.

Installation

Install the required development packages:

sudo apt-get install libxml2-dev libxslt-dev python-dev lib32z1-dev

Install pybossa-z3950, remembering to activate your virtual environment:

git clone https://github.com/alexandermendes/pybossa-z3950
cd pybossa-z3950
source /home/pybossa/pybossa/env/bin/activate
python setup.py install

Copy the pybossa_z3950 folder into your PyBossa plugins directory:

cp -r pybossa_z3950 /home/pybossa/pybossa/pybossa/plugins

The plugin will be available after you next restart the server.

Configuration

You can provide Z39.50 database configuration details by adding the following variable to your main PyBossa configuration file:

Z3950_DATABASES = ["loc": {"db": "Voyager", "host": "z3950.loc.gov", "port": 7090}]

The example above is enough to allow you to search to the Library of Congress database. See the Flask-Z3950 documentation for more details.

HTTP API

The API provided by this plugin can be used to search databases via the Z39.50 protocol and retrieve results as JSON, HTML, MARCXML or raw string data.

By default, the API endpoints are located at:

GET /z3950/search/<db>/marcxml
GET /z3950/search/<db>/json
GET /z3950/search/<db>/html
GET /z3950/search/<db>/raw

See the Flask-Z3950 documentation for full details.

Testing

This plugin makes use of the PyBossa test suite while running tests. The Travis CI configuration file contains all of the required commands to set up a test environment and run the tests.

Contributing

See the CONTRIBUTING file for guidelines on how to suggest improvements, report bugs or submit pull requests.