ckanext-iiif
IIIF for CKAN
Overview
This extension enables IIIF functionality for CKAN by implementing the Presentation API. Currently, this includes a single manifest builder for records, but through the IIIIF interface you can extend the builders to include other IIIF resources.
Installation
Installing from PyPI
pip install ckanext-iiif
Installing from source
Clone the repository into the src folder:
cd $INSTALL_FOLDER/src
git clone https://github.com/NaturalHistoryMuseum/ckanext-iiif.git
Activate the virtual env:
. $INSTALL_FOLDER/bin/activate
Install via pip:
pip install $INSTALL_FOLDER/src/ckanext-iiif
Post-install setup
- Add ‘iiif’ to the list of plugins in your config file:
ckan.plugins = ... iiif
Configuration
There are no configuration options for this extension.
Usage
This extension’s main function is to provide a standard endpoint and action to create IIIF resources. IIIF resources can be accessed via either the /iiif/<identifier> endpoint or the build_iiif_resource action.
Record Manifest Builder
By default, the only IIIF resource this extension can build is record manifests. This requires the record_show action to be available from the ckanext-nhm extension.
To build a record manifest you must provide the appropriate identifier in the format resource/<resource_id>/record/<record_id>.
The images are detected in the record by looking for the _image_field extra on the resource.
Adding a Custom Builder
To add a custom builder, implement the IIIIF interface in your extension plugin.
Dependencies