Skip to content

Examples english version

nilsw-ra edited this page Jan 12, 2023 · 5 revisions

Swedish version

OAI-PMH

Simple Python examples of how to read data from the OAI-PMH responses' EAD XML.

IIIF

Reverse proxy

Using a reverse proxy for the IIIF service has several advantages. Primarily, logging and statistics become more relevant and correct, both for the National Archives and for the external service. We provide two simple examples of proxy configuration, for Apache HTTP server (httpd) and Nginx. Both examples include a Docker and Docker Compose setup to run the proxy service. Docker Compose is not strictly necessary here, as the exampels run one container at the time, but it is easy to run and easy to extend.

Note that the examples provide minimal configuration, not a complete web server seup.

IIIF Presentation, Collection browser

The proxy examples include a basic web app to browse the IIIF Collection tree and display images, as an example of how to use the IIIF Presentation API.

IIIF Presentation, image download

Simple example in Python to download all images for an archival unit. Usage:

$ python download.py {pid}

where {pid} is the persistent id of the archival unit (archive, series, volume etc), e.g. sLN5hfyxweZJUG018W43t3 (for Kronans fästningsfängelses arkiv, the series Liggare och register)