You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/metadata/object-paths.md
+75-49Lines changed: 75 additions & 49 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,52 +46,58 @@ For example:
46
46
47
47
## Path for YouTube Objects
48
48
49
-
YouTube video items are supported in Item pages via the `video` value for the "[display_template]({{ '/docs/metadata/csv_metadata/#display_template' | relative_url }})" metadata field.
49
+
YouTube video items are supported in Item pages via the `video` value for the [display_template]({{ '/docs/metadata/csv_metadata/#display_template' | relative_url }}) metadata field.
50
50
Provide the full YouTube video link in the "object_location" metadata field.
51
51
Use the API recipes below to fill in the "image_small" and "image_thumb" fields if desired.
52
52
53
53
The "image_small" and "image_thumb" fields can be filled in using YouTube's image API.
54
-
This API is not well documented by Google, but is used by many sites and JS libraries.
54
+
This API is not well documented by Google, but is used by many sites and JS libraries--check the details below.
55
55
56
56
For most CB collections the recipes will look like:
57
57
58
-
- "object_location" = the full YouTube video link, https://youtu.be/`[youtubeid]`
59
-
- e.g. https://youtu.be/CVXQ3X6Q8oU
60
-
- "image_small" = max quality youtube image api, https://img.youtube.com/vi/`[youtubeid]`/maxresdefault.jpg
61
-
- e.g. https://img.youtube.com/vi/CVXQ3X6Q8oU/maxresdefault.jpg
62
-
- "image_thumb" = high quality youtube image api, https://img.youtube.com/vi/`[youtubeid]`/hqdefault.jpg
63
-
- e.g. https://img.youtube.com/vi/CVXQ3X6Q8oU/hqdefault.jpg
Below is more information about the YouTube image API incase the recipe suggestions above do not work for your collection.
68
73
Keep in mind you can also manually create your own derivative images for the videos (using screenshots or exports) if the auto generated YouTube options don't meet your needs.
69
74
70
75
Basically, you can get four sizes of the default thumbnail, or four smaller thumbnails from different points in the video.
71
-
You can use the domain "img.youtube.com" or "i3.ytimg.com"
76
+
You can use the domain "img.youtube.com" or "i3.ytimg.com".
77
+
Replace `[youtubeid]` with the id of your video in these recipes.
72
78
73
79
Default images:
74
80
75
-
- thumb 120x90, https://img.youtube.com/vi/`[youtubeid]`/default.jpg
76
-
- medium quality 320x180, https://img.youtube.com/vi/`[youtubeid]`/mqdefault.jpg
77
-
- high quality 480x360, https://img.youtube.com/vi/`[youtubeid]`/hqdefault.jpg
78
-
- SD 640x480 (not available for all videos), https://img.youtube.com/vi/`[youtubeid]`/sddefault.jpg
79
-
- max quality 1280×720 (or 1920x1080?, not available for all videos), https://img.youtube.com/vi/`[youtubeid]`/maxresdefault.jpg
81
+
- thumb 120x90, `https://img.youtube.com/vi/[youtubeid]/default.jpg`
82
+
- medium quality 320x180, `https://img.youtube.com/vi/[youtubeid]/mqdefault.jpg`
83
+
- high quality 480x360, `https://img.youtube.com/vi/[youtubeid]/hqdefault.jpg`
84
+
- SD 640x480 (not available for all videos), `https://img.youtube.com/vi/[youtubeid]/sddefault.jpg`
85
+
- max quality 1280×720 (or 1920x1080?, not available for all videos), `https://img.youtube.com/vi/[youtubeid]/maxresdefault.jpg`
For more control, you can use [YouTube Data API](https://developers.google.com/youtube/v3/), but it requires a key to access.
89
95
90
96
------
91
97
92
98
## Path for Vimeo Objects
93
99
94
-
Vimeo video items are supported in Item pages via the `video` value for the "[display_template]({{ '/docs/metadata/csv_metadata/#display_template' | relative_url }})" metadata field.
100
+
Vimeo video items are supported in Item pages via the `video` value for the [display_template]({{ '/docs/metadata/csv_metadata/#display_template' | relative_url }}) metadata field.
95
101
Provide the full Vimeo video link in the "object_location" metadata field.
96
102
97
103
Vimeo does not have a documented thumbnail API.
@@ -104,50 +110,67 @@ One option is to create screenshots to use as derivative images--if image_thumb
104
110
[Internet Archive](https://archive.org/) image items are accessible via standard IIIF api.
105
111
Check the [IA IIIF documentation](https://iiif.archive.org/iiif/documentation) for full details.
106
112
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.
113
+
You can upload your items at IA or curate existing IA items for your exhibit.
114
+
Since IA's interface isn't great for browsing and you can not customize item pages, using CB to provide context for a curated collection is a great option.
108
115
109
116
### Single Image Items
110
117
111
118
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
119
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
120
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`
121
+
-**ID:**
122
+
- IA item id is the last part of the item's URL.
123
+
- Example: for URL "https://archive.org/details/mma_wheat_field_with_cypresses_436535" the id is `mma_wheat_field_with_cypresses_436535`
124
+
-**Filename:**
125
+
- 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. You can look at the filename as listed in the downloads or copy the download link to get the name.
126
+
- Example: visiting the [example item's download page](https://archive.org/download/mma_wheat_field_with_cypresses_436535) we can see the filename is `436535.jpg`.
127
+
- 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`.
128
+
- Example: 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!
129
+
-*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`. 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!
- Recipe: `https://iiif.archive.org/iiif/3/` + item id + `/manifest.json`
159
+
- Example: for book item page at "https://archive.org/details/aladoren00newbuoft", the IIIF manifest will be `https://iiif.archive.org/iiif/3/aladoren00newbuoft/manifest.json`
160
+
161
+
The recipe for manifest url is the same for both book and single image items, and can be used for either to display the item in a IIIF viewer.
162
+
You will still want to figure out appropriate derivatives for "image_small" and "image_thumb" using the IIIF recipes above or manually created images.
142
163
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.
164
+
With the manifest.json url in "object_location", you will then modify the "image" display_template or create a new display_template that uses a IIIF viewer to display the items.
165
+
CB has an include with [Universal Viewer](https://github.com/UniversalViewer/universalviewer) set up to use in this context.
145
166
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.
167
+
If all your "image" items are set up with a manifest.json, edit "_layouts/item/image.html"--or if you would like to create a new custom display_template, create a new file such as "_layouts/item/iiif_image.html" by copying "_layouts/item/image.html".
168
+
In the file, change the line:
147
169
148
-
In "_layouts/item/image.html" (or a new file such as "_layouts/item/iiif_image.html") change
149
170
`{% raw %}{% include item/image-gallery.html %}{% endraw %}`
150
-
to
171
+
172
+
to to use the iiif-manifest-universal-viewer include instead:
173
+
151
174
`{% raw %}{% include item/iiif-manifest-universal-viewer.html %}{% endraw %}`
152
175
153
176
Note: Universal Viewer this will work with manifest.json loaded from IA.
@@ -161,11 +184,14 @@ A potential work around is to download a the manifests and put them directly in
161
184
The CONTENTdm API can be used to retrieve display images and file downloads from any CONTENTdm repository.
162
185
To use the API you will need to know the "Collection Alias" and "CONTENTdm number" of each object:
163
186
164
-
- The **Collection Alias** is a path assigned by CONTENTdm and can be found in CONTENTdm Admin on the Collections > Profile page, or by looking at the URL of the collection on the web. For example "https://cdm17254.contentdm.oclc.org/digital/collection/ui_ep/search" the collection alias is given after "/collection/", so would be `ui_ep`.
165
-
166
-
- The values for **CONTENTdm number** are included in your metadata by default when you export your collection's metadata from CONTENTdm.
187
+
-**Collection Alias**
188
+
- a path assigned by CONTENTdm and can be found in CONTENTdm Admin on the Collections > Profile page, or by looking at the URL of the collection on the web.
189
+
- Example: "https://cdm17254.contentdm.oclc.org/digital/collection/ui_ep/search" the collection alias is given after "/collection/", so would be `ui_ep`.
190
+
-**CONTENTdm number**
191
+
- Individual identifier for each item in a collection. The values for *CONTENTdm number* are included in your metadata by default when you export your collection's metadata from CONTENTdm.
192
+
- Example: `1`
167
193
168
-
Once you have columns in your metadata for "Collection Alias" and "CONTENTdm number" you can use formulas in Sheets or OpenRefine based on the CDM APIs to fill in `object_location`, `image_small`, and `image_thumb` columns for different item types.
194
+
Once you have columns in your metadata for "Collection Alias" and "CONTENTdm number" you can use formulas in Sheets or OpenRefine based on the CDM APIs to fill in "object_location", "image_small", and "image_thumb" columns for different item types.
169
195
In general, it is best to use IIIF for image objects and CDM "utils" API for non-image items.
170
196
171
197
-[CONTENTdm API reference](https://help.oclc.org/Metadata_Services/CONTENTdm/Advanced_website_customization/API_Reference/CONTENTdm_API)
0 commit comments