This repository is archived as of September 2020.
This module implements Mirador open source IIIF image viewer for Islandora Book and Large Image objects and provides functionality to generate IIIF Manifests and ingest them into our IIIF API server.
This module is based off Islandora Mirador Bookreader and Islandora SharedCanvas Manifest Generator. Initial development of both modules was supported by the The Andrew W. Mellon Foundation for the French Renaissance Paleography website.
- Drupal 7.x with Islandora 7.x
- Drupal module Libraries API
- Compiled Mirador javascript library
- Stable 2.x release version You need to compile it following the README file. The Master branch contains many experimental features that are not stable, but fun for testing.
- UTL IIIF Presentation API server
- IIIF Image API server
- Loris works well.
NOTE: Uninstall islandora_mirador_bookreader and sc_manifest_generator modules (if installed).
- Download compiled Mirador javascript library into Drupal's libraries directory, usually in
sites/all/libraries
. Verify the file permission is web servable. - Clone and enable this module.
- Go to admin/islandora/solution_pack_config/book and choose Mirador BookReader under Book Viewers and Page Viewers.
- Go to /admin/islandora/solution_pack_config/large_image and choose Mirador BookReader under Viewers
In order for the viewer to automatically display the current page's book object, you can generate and ingest a IIIF Manifest for the object and tell the viewer to use this when loading the page.
This produces IIIF Manifest for the following Islandora Solution Packs:
- Islandora Book Solution Pack as a IIIF Manifest
- Islandora Large Image Solution Pack as a IIIF Manifest
- Islandora Compound Solution Pack as a IIIF Manifest for the Compound object's first Large Image child
There are two ways to generate IIIF Manifests: Via Drush or Via one of the above mentioned Solution Pack. Both ways would first delete the existing IIIF Manifest and then create the newly generated IIIF Manifest into the server.
On the command line, run the following drush command:
drush iiifgen PID_OF_OBJECT
where PID_OF_OBJECT is the PID of the object to generate IIIF Manifest.
To generate the IIIF for a Collection and all of its children, run the drush command with the recursive
flag:
drush iiifgen PID_OF_OBJECT --recursive
For testing and debugging purposes, run the drush command with the test
and show
flag:
drush iiifgen PID_OF_OBJECT --test --show
where test
will prevent the datastream being ingested and show
will output the generated JSON in the console.
To perform the operation in production environment, run the drush command with production
flag:
drush iiifgen PID_OF_OBJECT --production --auth='theAuthenticationToken'
All possible flags are as follows:
--recursive => Whether to recursively generate IIIF Manifest for this object including its children: true|false. Defaults to false.
--test => Whether to run the command in Test mode: true|false. Defaults to false.
--show => Whether to print the resulting IIIF JSON object: true|false. Defaults to false.
--production => Whether to perform in production environment. Defaults to using development.
--auth=<token> => JWT authentication token. Used to ingest the generated JSON into IIIF server.
--delete => Whether to delete the given PID from IIIF server.
Example output when generating a Collection Manifest will look like:
drush iiifgen paleography:historicalmaps --test --recursive
<<<<<<<-- Running in TEST mode. This will not ingest to Fedora. -->>>>>>>>
Processing IIIF Collection for Object: paleography:historicalmaps
Collection has 6 children
Processing Sub Manifest: paleography:423 for Collection: paleography:historicalmaps
Processing Sub Manifest: paleography:387 for Collection: paleography:historicalmaps
..............
<<<<<<<-- Running in Recursive mode. -->>>>>>>>
Processing Manifest paleography:423
Processing Canvas (Page) for Object: paleography:423
Processing Manifest paleography:423
Processing Canvas (Page) for Object: paleography:423
..............
Successfully generated the IIIF JSON for: paleography:historicalmaps [status]
Successfully generated the IIIF JSON for: paleography:423 [status]
Successfully generated the IIIF JSON for: paleography:423 [status]
..............
Each Comaptible Solution Pack object has a new IIIF Generation option under Manage through the admin UI for each object. The option exists as a sub-menu item.
Clicking Generate IIIF Manifest will add/update a IIIF Manifest in the server.
The thumbnails do not appear unless the view changes. In $.ThumbnailsView's Handelbars the src attribute does not receive the value when first loading. To fix this, thumbUrl was placed into the src value.
When Mirador is initialized with an array of manifests, it can display any one of them automatically by setting the loadedManifest option in the windowObjects array. However, Mirador does not prioritize loading the loadedManifest, causing it to wait until the other manifests before it in the array have been loaded. If the current manifest is in low position in a large array, the wait could be long. The fix was to manually rearrange the loadedManifest's position to be at top before initializing Mirador.
In official release the annotation overlay "speech bubble" can be removed by setting annotationLayer to false in the windowObjects array. However, the setting could not be applied to subsequent windows. Instead, the overlay link is hidden from view via CSS.
Copyright 2020 University of Toronto Libraries
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.