Introduction

In digital archives using IIIF (International Image Interoperability Framework), materials consisting of multiple volumes or chapters are sometimes combined into a single Manifest. In such cases, there is a need to create links to the opening page of each volume or chapter.

This time, I created a simple web tool that extracts the label and first Canvas URL of each volume (range/structure) from IIIF Manifests.

Tool URL: https://nakamura196.github.io/iiif-manifest-extractor/

GitHub: https://github.com/nakamura196/iiif-manifest-extractor

Features

  • Batch processing of multiple Manifest URLs (one URL per line)
  • List display of labels and first Canvas URLs for each volume/chapter
  • Export in CSV/JSON format
  • Real-time display of processing progress

Usage

  1. Open the tool
  2. Enter Manifest URLs in the text area (multiple lines accepted)
  3. Click the “Extract” button
  4. Results are displayed in table format
  5. Download as CSV/JSON as needed

Sample

You can verify the behavior with the following Manifest URLs. By entering multiple URLs, you can also verify the batch processing behavior.

National Diet Library Digital Collection “Koui Genji Monogatari”:

hhttttppss:://ddll..nnddll..ggoo..jjpp//aappii//iiiiiiff//33443377668867//mmaanniiffeesstt..jjssoonn

These Manifests have each chapter of the Tale of Genji (Kiritsubo, Hahakigi, Utsusemi, Wakamurasaki, etc.) defined in the structures, allowing you to extract the opening page of each chapter.

By entering two Manifest URLs, you can verify that multiple Manifests are processed in batch and the results can be exported together as CSV.

Technical Mechanism

Structures in IIIF Presentation API v2

In IIIF Presentation API v2, you can define logical structures (table of contents) using the structures property.

{}"]st{}{}r,u"""""""]c@lr@@lcttaaitaa""uybndybnhhrpeg"pevtteele:elatts""s""spp"::""::ess::rs::""a"""/[s[ns:/c"gcee:"re:[xxR,a1Raaan"a"mmng,n,ppgeglle1eee"""..,,,ccoo"mmr//accnaagnnevv2aa"ss,//pp12"".,,]

This tool extracts from each range in structures:

  1. label (volume name, chapter name, etc.)
  2. The first element of the canvases array (Canvas URL of the opening page)

Fallback Processing

If structures does not exist, a fallback process is implemented that retrieves the first element of sequences[0].canvases.

Limitations

  • Only supports IIIF Presentation API v2: Does not support v3 format Manifests (those using items)
  • CORS restrictions: The server providing the Manifest must allow CORS

Implementation

It is composed of pure HTML/CSS/JavaScript and requires no server-side processing. It is statically hosted on GitHub Pages.

The main processing flow:

cci}oofnnf}FssE(oettxmri}i}ttaffcrmrn(cccheaaicS(oP(osncfoksnrsnnMpitenittotssAaofsspricrttdnneettuneudissa.pcusclffetcssatestaitehttru;ubros==rrerrrestruuneaelteaaacct.n.Cxwwnttrgc=ataaguuraeanriierransnsvatteengvtacfsgewarstfrr)oesisueeeofstec=dtsm{&hstcpm(&usdhosatc&rta(ntnhsa&ertusriotn.uareufsrvslcl.ceeuatat)jtscsrbu;sutwteueror.iusclenestrt;.(stheuc)r.ra;urrencaa.vtnncauggasreeneessvss).a[)ls0ee]{ns;g.tlhen>gt0h)>{0){

Conclusion

This tool was created to streamline the work of creating links to materials in digital archives. Due to its simple structure, it is also easy to customize as needed.

If you have questions or feedback, please let us know via GitHub Issues.

References