Skip to content

Commit

Permalink
Resolved merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
triplingual committed Sep 22, 2023
2 parents 0aff8a2 + 7f6bf92 commit c265e8e
Show file tree
Hide file tree
Showing 68 changed files with 35,093 additions and 116,453 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
run: echo BRANCH_NAME=`git rev-parse --abbrev-ref HEAD` >> $GITHUB_ENV

- name: Setup ruby
uses: actions/setup-ruby@v1
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- run: gem install bundler && bundle
Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.7.2
3.1.0
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ gem 'iiifc-theme', github: 'iiif/iiifc-theme', branch: 'main'
# For open graph and Twitter Card elements
gem 'jekyll-seo-tag'

gem "webrick", "~> 1.7"

group :development, :test do
gem 'html-proofer', "3.19.0"
gem 'rspec'
Expand Down
60 changes: 31 additions & 29 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
GIT
remote: https://github.com/iiif/iiifc-theme.git
revision: 7b577741cac77dd45d962b300e02bfe0bfa8d2ce
revision: dcdf5cc4c169823256d88a58b4d3ea4f4384c9b8
branch: main
specs:
iiifc-theme (0.1.0)
Expand All @@ -15,15 +15,15 @@ GIT
GEM
remote: https://rubygems.org/
specs:
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
addressable (2.8.4)
public_suffix (>= 2.0.2, < 6.0)
colorator (1.1.0)
concurrent-ruby (1.1.10)
concurrent-ruby (1.2.2)
diff-lcs (1.5.0)
em-websocket (0.5.3)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0)
ethon (0.15.0)
ethon (0.16.0)
ffi (>= 1.15.0)
eventmachine (1.2.7)
ffi (1.15.5)
Expand All @@ -37,7 +37,7 @@ GEM
typhoeus (~> 1.3)
yell (~> 2.0)
http_parser.rb (0.8.0)
i18n (1.12.0)
i18n (1.14.1)
concurrent-ruby (~> 1.0)
jekyll (4.1.1)
addressable (~> 2.4)
Expand Down Expand Up @@ -73,43 +73,43 @@ GEM
rexml
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
liquid (4.0.3)
listen (3.7.1)
liquid (4.0.4)
listen (3.8.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
mercenary (0.4.0)
mini_portile2 (2.8.0)
nokogiri (1.13.9)
mini_portile2 (~> 2.8.0)
mini_portile2 (2.8.2)
nokogiri (1.15.2)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
nokogumbo (2.0.5)
nokogiri (~> 1.8, >= 1.8.4)
parallel (1.22.1)
parallel (1.23.0)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
public_suffix (4.0.7)
racc (1.6.0)
public_suffix (5.0.1)
racc (1.7.1)
rainbow (3.1.1)
rake (13.0.6)
rb-fsevent (0.11.1)
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
redcarpet (3.5.1)
redcarpet (3.6.0)
rexml (3.2.5)
rouge (3.29.0)
rspec (3.11.0)
rspec-core (~> 3.11.0)
rspec-expectations (~> 3.11.0)
rspec-mocks (~> 3.11.0)
rspec-core (3.11.0)
rspec-support (~> 3.11.0)
rspec-expectations (3.11.0)
rouge (3.30.0)
rspec (3.12.0)
rspec-core (~> 3.12.0)
rspec-expectations (~> 3.12.0)
rspec-mocks (~> 3.12.0)
rspec-core (3.12.2)
rspec-support (~> 3.12.0)
rspec-expectations (3.12.3)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.11.0)
rspec-mocks (3.11.1)
rspec-support (~> 3.12.0)
rspec-mocks (3.12.5)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.11.0)
rspec-support (3.11.0)
rspec-support (~> 3.12.0)
rspec-support (3.12.0)
safe_yaml (1.0.5)
sassc (2.4.0)
ffi (~> 1.9)
Expand All @@ -118,6 +118,7 @@ GEM
typhoeus (1.4.0)
ethon (>= 0.9.0)
unicode-display_width (1.8.0)
webrick (1.8.1)
yell (2.2.2)

PLATFORMS
Expand All @@ -130,6 +131,7 @@ DEPENDENCIES
jekyll-seo-tag
rake
rspec
webrick (~> 1.7)

BUNDLED WITH
2.1.4
2.3.3
18 changes: 16 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,10 @@ Currently the allowable viewers are:

* UV
* Mirador
* Annona
* Clover

but we would welcome other viewers. To see the requirments for adding other viewers please go to the Viewer Matrix page.
but we would welcome other viewers. To see the requirements for adding other viewers please go to the Viewer Matrix page.

#### Include link to Viewers
This provides a standard link to the JSON and also to viewers. A full example is as follows:
Expand All @@ -86,7 +88,19 @@ and this would produce the following line:

[JSON-LD]() | [View in Universal Viewer]() | [View in Mirador]() | [View in Tify]() | [View in IIIF Curation Viewer]()

The `manifest` parameter allows you to pass a relative link to the manifest and the `viewers` parameter is a list of Viewer links to show. Delete any viewers that don't support the recipe and remove the `viewers` parameter entirely if no viewers support the recipe.
The `manifest` parameter allows you to pass a relative link to the manifest and the `viewers` parameter is a list of Viewer links to show. For the Viewers property you have the following options:

* Include a comma seperated list of viewers. You must do this if there is partial support for one viewer. e.g [Simplest Manifest - Video](recipe/0002-mvm-audio/index.md) and [Metadata on any Resource](recipe/0002-mvm-audio/index.md) (Partial support example)
* Leave the viewers property empty if no viewer supports this functionality. e.g. `viewers=""` e.g. [Load a Preview Image Before the Main Content](recipe/0013-placeholderCanvas/index.md)
* Or if you want to take the list of supported viewers from the header `viewers` property remove this property. e.g. [Simplest Manifest - Single Image File](recipe/0001-mvm-image/index.md)

#### Include link to Code samples
To add a link to code samples add the following in the front matter:

```
code:
- iiif-prezi3
```

#### Include JSON Viewer
This will embed a JavaScript JSON viewer which will show line numbers and format the JSON. A basic example is as follows:
Expand Down
1 change: 1 addition & 0 deletions _includes/code_link.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{% if include.library | strip == "iiif-prezi3" %}<a href="https://iiif-prezi.github.io/iiif-prezi3/recipes/{{recipe_id}}/" target="_blank">Python: iiif-prezi3</a>{% endif %}
12 changes: 12 additions & 0 deletions _includes/code_links.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{% capture recipe_id %}{{ page.url | replace: "/recipe/","" | replace: "/",""}}{% endcapture %}

{% capture libraries %}
{% if include.libraries %}
{{include.libraries}}
{% else %}
{{ page.code }}
{% endif %}
{% endcapture %}

Code samples: {% for library in libraries %}{% include code_link.html library=library %}{% unless forloop.last %}|{% endunless -%}{% endfor %}

8 changes: 6 additions & 2 deletions _includes/links.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
[0139]: {{ site.cookbook_url | absolute_url }}/recipe/0139-geolocate-canvas-fragment/ "Represent Canvas Fragment as a Geographic Area on a Web Map"

[0019]: {{ site.cookbook_url | absolute_url }}/recipe/0019-html-in-annotations/ "HTML in Annotations"

[0021]: {{ site.cookbook_url | absolute_url }}/recipe/0021-tagging/ "Simple Annotation — Tagging"

[0032]: {{ site.cookbook_url | absolute_url }}/recipe/0032-collection/ "Simplest Collection"
Expand All @@ -42,11 +41,13 @@

[0024]: {{ site.cookbook_url | absolute_url }}/recipe/0024-book-4-toc/ "Book with Table of contents (ranges)"

[0068]: {{ site.cookbook_url | absolute_url }}/recipe/0068-newspaper/ "A newspaper"
[0068]: {{ site.cookbook_url | absolute_url }}/recipe/0068-newspaper/ "Basic Newspaper"
[0074]: {{ site.cookbook_url | absolute_url}}/recipe/0074-multiple-language-captions/ "Using Caption and Subtitle Files in Multiple Languages with Video Content"
[0117]: {{ site.cookbook_url | absolute_url }}/recipe/0117-add-image-thumbnail/ "Manifest Thumbnail"
[0118]: {{ site.cookbook_url | absolute_url }}/recipe/0118_multivalue/ "Displaying Multiple Values with Language Maps"

[0135]: {{ site.cookbook_url | absolute_url }}/recipe/0135-annotating-point-in-canvas/ "Annotating a specific point of an image"

[0154]: {{ site.cookbook_url | absolute_url }}/recipe/0154-geo-extension/ "Locate a Manifest on a Web Map"

[0232]: {{ site.cookbook_url | absolute_url }}/recipe/0232-image-thumbnail-canvas/ "Implementation discussion: Thumbnails on Canvases"
Expand All @@ -63,6 +64,9 @@
[0269]: {{ site.cookbook_url | absolute_url }}/recipe/0269-embedded-or-referenced-annotations/ "Embedded or Referenced Annotations"

[0326]: {{ site.cookbook_url | absolute_url }}/recipe/0326-annotating-image-layer/ "Annotate a specific images or layers"
[0306]: {{ site.cookbook_url | absolute_url }}/recipe/0306-linking-annotations-to-manifests/ "Linking external Annotations targeting a Canvas to a Manifest"

[0377]: {{ site.cookbook_url | absolute_url }}/recipe/0377-image-in-annotation/ "Image in annotation"

[cookbook-process]: {{site.cookbook_url | absolute_url }}/recipe

Expand Down
8 changes: 8 additions & 0 deletions _includes/manifest_links.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
{% if include.viewers %}
{% assign viewers = include.viewers | split: "," %}
{% else %}
{% assign viewers = page.viewers %}
{% endif %}
[JSON-LD]({{ include.manifest }}) {% for viewerTxt in viewers %}{% assign viewer = viewerTxt | strip %}| {% include viewer_link.html type=viewer manifest=include.manifest annotationurl=include.annotationurl %}{% endfor %}

{% if page.code %}
{% include code_links.html %}
{% endif %}
14 changes: 12 additions & 2 deletions _includes/viewer_link.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,25 @@
{% endcapture %}
{% else %}
{% capture viewer_url %}
https://ncsu-libraries.github.io/annona/tools/#/display?url={{manifest_url |strip}}&viewtype=iiif-rangestoryboard&settings=%7B%22fullpage%22%3Atrue%7D
https://ncsu-libraries.github.io/annona/tools/#/display?url={{manifest_url |strip}}&viewtype=iiif-storyboard&settings=%7B%22fullpage%22%3Atrue%7D
{% endcapture %}
{% endif %}
{% assign default_text="View in Annona" %}
{% elsif include.type == 'Clover' %}
{% capture viewer_url %}
https://samvera-labs.github.io/clover-iiif/?iiif-content={{manifest_url |strip}}
https://samvera-labs.github.io/clover-iiif/docs/viewer/demo?iiif-content={{manifest_url |strip}}
{% endcapture %}
{% assign default_text="View in Clover" %}
{% elsif include.type == 'Navplace Viewer' %}
{% capture viewer_url %}
https://map.rerum.io/?iiif-content={{manifest_url |strip}}
{% endcapture %}
{% assign default_text="View in Navplace Viewer" %}
{% elsif include.type == 'Ramp' %}
{% capture viewer_url %}
https://ramp.avalonmediasystem.org/?iiif-content={{manifest_url |strip}}
{% endcapture %}
{% assign default_text="View in Ramp" %}
{% else %}
{% capture default_text %}Unknown Viewer type '{{ include.type}}'{% endcapture %}
{% capture viewer_url %}{{manifest_url |strip}}{% endcapture %}
Expand Down
11 changes: 9 additions & 2 deletions index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ As part of the work to aid implementation the Cookbook group have developed a Vi
{% include misc/button.html button_link="recipe/matrix/" button_label="See IIIF viewer support" %}
{{ theme.block-end }}

## Code samples

As well as viewer support, the cookbook provides links to code samples in various development libraries to aid developers who hope to re-create these recipes in Code. You can see a full list of recipes with code samples in the [code samples](recipe/code/) page.

# Contributing

Anyone is welcome to submit a recipe idea or work on implementing a recipe. Advice and support can be received from the IIIF Cookbook channel on the IIIF Slack. For detailed information on how to contribute please see the [Cookbook process][cookbook-process].
Expand Down Expand Up @@ -82,8 +86,11 @@ _(leading on to segmentation examples later)_
* [Tagging with an External Resource][0258]
* hotspot linking
* [Annotate a specific images or layers][0326]
* [Annotating a specific point of an image][0135]
* [Geographic coordinates][0139]
* [Embedded or Referenced Annotations][0269]
* [Linking external Annotations targeting a Canvas to a Manifest][0306]
* [Image in annotations][0377]

## Internal structure

Expand Down Expand Up @@ -144,7 +151,7 @@ _(leading on to segmentation examples later)_
* [Table of Contents for Multiple A/V files on Multiple Canvases][0065] (65)
* Adaptive bit rate AV examples
* A field recording
* [A newspaper][0068]
* [Basic Newspaper][0068]
* Example with extensions and services
* A manuscript with multiple orderings
* a Sammelband
Expand All @@ -160,7 +167,7 @@ _this might be in a separate auth cookbook_

* probe service for simple resource
* auth for adaptive bit rate media (MPEG-DASH)
* [Anyone can deep zoom, auth reqd for hi-res download](https://digirati-co-uk.github.io/iiif-auth-client/?image=https://iiifauth.digtest.co.uk/img/11_kitty_joyner.jpg/info.json)
* Anyone can deep zoom, auth reqd for hi-res download

{% include acronyms.md %}
{% include links.md %}
4 changes: 3 additions & 1 deletion recipe/0001-mvm-image/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ viewers:
topic:
- basic
- image
code:
- iiif-prezi3
---


Expand All @@ -33,7 +35,7 @@ This recipe is not for large images or deep zoom functionality. For this, see th

## Example

{% include manifest_links.html viewers="UV, Mirador, Annona, Clover" manifest="manifest.json" %}
{% include manifest_links.html manifest="manifest.json" %}

{% include jsonviewer.html src="manifest.json" %}

Expand Down
2 changes: 1 addition & 1 deletion recipe/0001-mvm-image/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"@context": "http://iiif.io/api/presentation/3/context.json",
"id": "{{ id.url }}",
"type": "Manifest",
"label": { "en": [ "Image 1" ] },
"label": { "en": [ "Single Image Example" ] },
"items": [
{
"id": "{{ id.path }}/canvas/p1",
Expand Down
5 changes: 4 additions & 1 deletion recipe/0002-mvm-audio/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@ viewers:
- Mirador
- UV
- Clover
- Ramp
topic:
- basic
- AV
code:
- iiif-prezi3
---


Expand All @@ -26,7 +29,7 @@ The implementation is identical to the [image example][0001], except that the co

This example shows a Manifest with a single Canvas that lasts for 1985.024 seconds. It has a single audio file (audio-sample.mp4) which is associated with it. The mp4 also has a duration of 1985.024 seconds.

{% include manifest_links.html viewers="UV, Mirador, Clover" manifest="manifest.json" %}
{% include manifest_links.html viewers="UV, Mirador, Clover, Ramp" manifest="manifest.json" %}

{% include jsonviewer.html src="manifest.json" %}

Expand Down
5 changes: 4 additions & 1 deletion recipe/0003-mvm-video/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@ viewers:
- Mirador
- UV
- Clover
- Ramp
topic:
- basic
- AV
code:
- iiif-prezi3
---


Expand All @@ -26,7 +29,7 @@ The implementation is identical to the [image example][0001], except that the co

This example shows a Manifest with a single Canvas that lasts for 572 seconds, or just under 10 minutes. It has a single video file (lunchroom_manners_1024kb.mp4) which is associated with it. The mp4 also has a duration of 572 seconds.

{% include manifest_links.html viewers="UV, Mirador, Clover" manifest="manifest.json" %}
{% include manifest_links.html viewers="UV, Mirador, Clover, Ramp" manifest="manifest.json" %}

{% include jsonviewer.html src="manifest.json" %}

Expand Down
2 changes: 2 additions & 0 deletions recipe/0004-canvas-size/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ viewers:
- Mirador
- Annona
topic: image
code:
- iiif-prezi3
---

## Use Case
Expand Down
2 changes: 2 additions & 0 deletions recipe/0005-image-service/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ viewers:
topic:
- basic
- image
code:
- iiif-prezi3
---

## Use Case
Expand Down
2 changes: 2 additions & 0 deletions recipe/0006-text-language/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ viewers:
- Annona
topic: basic
property: label, summary, metadata, requiredStatement
code:
- iiif-prezi3
---

## Use case
Expand Down
Loading

0 comments on commit c265e8e

Please sign in to comment.