mjordan / islandora_workbench

A command-line tool for managing content in an Islandora 2 repository
MIT License
24 stars 40 forks source link

Provide a hook script that pregenerates the IIIF Manifest for Paged Content and Publication Issue nodes #771

Closed mjordan closed 5 months ago

mjordan commented 5 months ago

Since caching IIIF Manifests speeds up the rendering of the Mirador/OpenSeadragon viewer for paged content, it would be useful to have a drop-in Workbench hook script that users could configure to seed the cache for each applicable node's manifest.

Unfortunately, a node-post-create script won't work since it would fire as soon as the parent book/publication issue node is created, at which point the pages won't exist. A manifest generated at this point would have no members.

A shutdown script would work, if it iterated through all the Paged Content and Publication Issue nodes at the end of the Workbench job and hit the manifest URL for each, namely /node/[nid]/book-manifest. This shutdown script could query the CSV-to-node-ID map to get all parent CSV IDs created using the current config file, then for each of those, get the corresponding node ID and pregenerate the IIIF manifest for it.

mjordan commented 5 months ago

Adding shutdown: [/absolutepathto/islandora_workbench/scripts/generate_iiif_manifests.py"] to your config file will generate the IIIF Manifest (book-manifest) for each parent node. Log for this script is at "iiif_generation.log".

mjordan commented 5 months ago

Resolved with edd88700d48ce49843d15576fe5b2de35b9a0bb1, docs added to https://mjordan.github.io/islandora_workbench_docs/hooks/.