Skip to content

Commit 277a023

Browse files
committed
internet archive recipes documented
1 parent 8fd7b17 commit 277a023

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed

docs/metadata/object-paths.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ This section presents example recipes for figuring out the fields for a few comm
1515
- [Self-Hosted Objects](#example-paths-for-external-or-self-hosted-objects)
1616
- [YouTube Objects](#path-for-youtube-objects)
1717
- [Vimeo Objects](#path-for-vimeo-objects)
18+
- [Internet Archive Objects](#path-for-internet-archive-objects)
1819
- [CONTENTdm Objects](#path-for-contentdm-objects)
1920

2021
------
@@ -98,6 +99,63 @@ One option is to create screenshots to use as derivative images--if image_thumb
9899

99100
------
100101

102+
## Path for Internet Archive Objects
103+
104+
[Internet Archive](https://archive.org/) image items are accessible via standard IIIF api.
105+
Check the [IA IIIF documentation](https://iiif.archive.org/iiif/documentation) for full details.
106+
This works well for adding image and book items into a CB collection without needing to store any objects in your project.
107+
You can upload your items at IA or curate existing items in for your exhibit.
108+
109+
### Single Image Items
110+
111+
For single image items following the standard CB set up, you will use the IIIF recipes to create image URLs for your "object_location", "image_small", and "image_thumb" fields.
112+
To use the recipes you will need the image identifier--this is a bit tricky because you will need the item id plus the individual filename to create the identifier for IIIF.
113+
114+
- **ID:** IA item id is the last part of the item's URL.
115+
- e.g. https://archive.org/details/mma_wheat_field_with_cypresses_436535 the id is `mma_wheat_field_with_cypresses_436535`
116+
- **Filename:** The filename can be found by checking the "Download Options" box on the item's page. Click "Show all" option. This will list various files. Look for the main JPG, which might have a strange name.
117+
- e.g. https://archive.org/download/mma_wheat_field_with_cypresses_436535 the filename is "436535.jpg".
118+
- You can use this method to reference individual images from a book / multiple image items. Looking at the download files, the images will be in a zip folder (generally look for the JP2 version). You will separate each level of folders shown in the downloads by an escaped slash `%2f`. E.g. to get the cover of this [book item](https://archive.org/details/aladoren00newbuoft), the filename is `%2faladoren00newbuoft_jp2.zip%2faladoren00newbuoft_jp2%2faladoren00newbuoft_0001.jp2` (a zip file, then a folder, then the filename). Generally, it will be easier to get this info from the manifest.json!
119+
- *Alternatively,* you can find the IIIF identifier by checking the "info.json" for an item following the pattern `https://iiif.archive.org/iiif/` + item id + `/info.json`, e.g. https://iiif.archive.org/iiif/mma_wheat_field_with_cypresses_436535/info.json. This json will have a field "@id" listed, with the full identifier following the "https://iiif.archive.org/image/iiif/2/" url. Note, "info.json" is only available for single image items!
120+
- **Identifier:** The identifier for IIIF will be the ID and Filename separated by an escaped slash `%2f`
121+
- e.g. `mma_wheat_field_with_cypresses_436535%2f436535.jpg`
122+
123+
Once you have the identifier, you can use standard IIIF recipes to create urls that will retrieve appropriately sized images:
124+
125+
- "object_location" = full sized, `https://iiif.archive.org/image/iiif/3/` + identifier + `/full/max/0/default.jpg`
126+
- e.g. https://iiif.archive.org/image/iiif/3/mma_wheat_field_with_cypresses_436535%2f436535.jpg/full/max/0/default.jpg
127+
- "image_small" = 800px width, `https://iiif.archive.org/image/iiif/3/` + identifier + ``/full/,800/0/default.jpg`
128+
- e.g. https://iiif.archive.org/image/iiif/3/mma_wheat_field_with_cypresses_436535%2f436535.jpg/full/,800/0/default.jpg
129+
- "image_thumb" = 450px width, `https://iiif.archive.org/image/iiif/3/` + identifier + `/full/,450/0/default.jpg`
130+
- e.g. https://iiif.archive.org/image/iiif/3/mma_wheat_field_with_cypresses_436535%2f436535.jpg/full/,450/0/default.jpg
131+
132+
### Book, Multiple Image Items, or IIIF Viewer
133+
134+
To display an IA item with a IIIF viewer (instead of the default CB simple image style template), it is possible to use the "manifest.json".
135+
The full url to the "manifest.json" file will be used in the "object_location" field.
136+
The recipe follows the pattern:
137+
`https://iiif.archive.org/iiif/3/` + item id + `/manifest.json`
138+
139+
e.g. for book item page, https://archive.org/details/aladoren00newbuoft
140+
the IIIF manifest will be at
141+
https://iiif.archive.org/iiif/3/aladoren00newbuoft/manifest.json
142+
143+
The recipe for manifest url is the same for both book and single image items, and can be used for either in the universal IIIF viewer.
144+
You will still want to figure out appropriate derivatives for "image_small" and "image_thumb" using the recipes above or manually created images.
145+
146+
With the manifest.json url in "object_location", you will then modify the "image" display_template or create a new display_template for the IIIF viewer items.
147+
148+
In "_layouts/item/image.html" (or a new file such as "_layouts/item/iiif_image.html") change
149+
`{% include item/image-gallery.html %}`
150+
to
151+
`{% include item/iiif-manifest-universal-viewer.html %}`
152+
153+
Note: Universal Viewer this will work with manifest.json loaded from IA.
154+
However, for many other servers, attempting to load a remote manifest this will trigger a CORS issue.
155+
A potential work around is to download a the manifests and put them directly in your project to avoid CORS.
156+
157+
------
158+
101159
## Path for CONTENTdm Objects
102160

103161
The CONTENTdm API can be used to retrieve display images and file downloads from any CONTENTdm repository.

0 commit comments

Comments
 (0)