GithubHelp home page GithubHelp logo

iiif / cookbook-recipes Goto Github PK

View Code? Open in Web Editor NEW
37.0 30.0 31.0 18.26 MB

For working on the recipes

Home Page: https://iiif.io/api/cookbook/index.html

HTML 19.49% CSS 33.41% Ruby 21.58% Shell 2.97% Python 22.54%
iiif cookbook recipes standards best-practices

cookbook-recipes's Introduction

IIIF cookbook recipes repository

This repository is the source location for the IIIF 3.0 recipes. The aim is to show how to model various use cases in workable IIIF presentation assets.

Contributing

Please see the Cookbook Process.

Jekyll Variables and Templates

In Jekyll .md files:

There are some includes that are helpful to ensure a consistent style between recipes. These include:

Front matter

The front matter is part of the Jekyll content management system and can be used to configure various aspects of the page and we also use some of these properties to drive separate pages like the viewer matrix. The front matter is at the start of an index.md and a full example is given below:

---
layout: recipe
tags: [audio, video]
summary: "This manifest uses the 'start' property to specify a point in an audio or video object where a client application should begin playback."
viewers:
 - id: UV
   support: partial
 - Mirador  
topic: AV
property: start
---

The fields are as follows:

  • layout must be recipe for all recipes. This controls the layout of the page
  • tags this is used in the recipe listing page and is currently uncontrolled and optional. It is shown on the full list of recipes
  • summary a short summary of the recipe. It is shown on the full list of recipes
  • viewers see further details below but this drives the Viewer Matrix
  • topic a controlled list of headings that are used on the viewer matrix. Allowed values are basic, property, structure, image, AV, annotation or geo-recipes. A recipe may have multiple topics and these would be expressed as a list for example:
topic: 
 - basic
 - AV
  • property Include if the recipe is about a particular IIIF Property. This optional and multiple values are separate by commas.

Viewer Matrix

This is generated using the viewer tag in the front matter. The simplest form is if the viewer fully supports the recipe and in this case the supporting viewers can be presented as a list like the following:

viewers:
 - UV
 - Mirador

If there is only partial support then this must be expressed using a map such as:

viewers:
 - id: UV
   support: partial

Combining partial support for one viewer and full support for another can be achieved by combining the list and map as seen the full Front Matter example above. If a viewer doesn't support this recipe then it should not appear in the list. If the recipe isn't supported by any viewer it should have an empty viewers field for example:

viewers:
topic: annotation

Currently the allowable viewers are:

  • UV
  • Mirador
  • Annona
  • Clover

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:

{% include manifest_links.html viewers="UV, Mirador, Tify, Curation" manifest="manifest.json" %}

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. For the Viewers property you have the following options:

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:

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

Where src is the relative path to the JSON file. It is also possible to add a config parameter if you would like to customise the view further. An example of this is to highlight the first 5 lines:

{% include jsonviewer.html src="manifest.json" config='data-line="1-4"' %}

See the prism.js website for a full list of configuration options.

In JSON files:

To make the process of making the manifests resolvable during all stages of the deployment (local, test and preview deployment) there are a number of Jekyll variables available for use in JSON files. These include:

For an example of these variables in practice please see:

https://github.com/IIIF/cookbook-recipes/blob/master/recipe/0001-mvm-image/manifest.json

Fixtures

There are a number of fixtures held centrally to help assist you in creating a recipe. This includes Audio and Video files and also a IIIF Image server. To see details of these fixtures please go to:

https://fixtures.iiif.io/

Live site

The cookbook site is available at:

https://iiif.io/api/cookbook/

To build locally:

bundle install

bundle exec jekyll serve

Then connect to http://localhost:4000/

Preview links

This repository can be viewed using the following pattern:

https://preview.iiif.io/cookbook/<branch_name>/

for all branches but master. For example to see the themed version:

https://preview.iiif.io/cookbook/themed/

cookbook-recipes's People

Contributors

azaroth42 avatar cjcolvar avatar cubap avatar dananji avatar dependabot[bot] avatar digitaldogsbody avatar dnoneill avatar giacomomarchioro avatar glenrobson avatar hadro avatar illtud avatar julsraemy avatar kirschbombe avatar ksclarke avatar lpoujade avatar markpbaggett avatar mathewjordan avatar mcwhitaker avatar mejackreed avatar mikeapp avatar nfreire avatar razasaleem3 avatar regisrob avatar robcast avatar thehabes avatar tomcrane avatar triplingual avatar vibo448 avatar yangli0516 avatar zimeon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cookbook-recipes's Issues

Describe patterns for cross version Collections?

Can a v2 Collection contain a v3 Manifest? What about vice versa? Which context do the member resources use?

What if there are viewingHint values from v3, but the collection is v2?

And similar annoying forwards/backwards compatibility issues.

Book (paging variations)

Book (paging variations)

(Provide link to index.md of the issue, if available. To be filled in after issue is created - you need the issue number!)

Use case

I have objects that have the concept of recto and verso; are paged. I have objects that have no such concept. I have objects that are photographed in different ways (one image per page, oneimage per pair of open pages, etc).

Embedding HTML in descriptive properties (metadata, description)

Multiple formats of strings (text, html, markdown...?)

(Provide link to index.md of the issue, if available. To be filled in after issue is created - you need the issue number!)

Use case

You want to have more control on how your metadata is displayed. For example scientific names, and also links out to other sites. Also legacy systems that might include things like italic tags.

Additional optional content accompanying the thing being modeled

Additional optional content accompanying the thing being modeled

(Provide link to index.md of the issue, if available. To be filled in after issue is created - you need the issue number!)

Use case

I wish to provide the user with something to look at while they listen to the work represented by the IIIF resource, or I wish to provide something for the user to listen to while they interact with the visual work represented by the IIIF resource.

Important that the additional content can be ignored without loss of fidelity of the modeled thing.

Example cases to make recipes:

  • Manuscript with an (unrelated) time-appropriate music to play in the background
  • Ads to show while a podcast playing

Simplest Tagging Annotation

Tagging

(Provide link to index.md of the issue, if available. To be filled in after issue is created - you need the issue number!)

Use case

Examines the ways in which tagging annotations can be used in IIIF

Thumbnail selection algorithm implementation note

thumbnail algorithm / discussion

(Provide link to index.md of the issue, if available. To be filled in after issue is created - you need the issue number!)

Use case

As a developer of client tools, how do I pick the best thumbnail for a resource?
As a publisher, how do I help developers get the best thumbnail?

Table of contents (ranges) - acts of an opera

Table of contents (ranges) - acts of an opera

(this will usually be the same as the issue name)

(Provide link to index.md of the issue, if available. To be filled in after issue is created - you need the issue number!)

Use case

The logical structure of an audio recording - an opera, with a hierarchy of acts, arias, etc.

Poster Image Displayed Before Interaction

Poster image displayed before interaction

(Provide link to index.md of the issue, if available. To be filled in after issue is created - you need the issue number!)

Use case

I wish to provide the user with something to look at before they choose to start interacting with the object, and/or while they wait for it to load/buffer.

Simplest Manifest - Single Video File

Simplest Manifest - Single Video File

(Provide link to index.md of the issue, if available. To be filled in after issue is created - you need the issue number!)

Use case

You have a video resource available on the web and want to present it in a IIIF environment.

ImageApiSelector - rotating/cropping an image onto a canvas

Reusing an image service (ImageApiSelector)

(Provide link to index.md of the issue, if available. To be filled in after issue is created - you need the issue number!)

Use case

I need to present rotated and cropped versions of a IIIF Image on canvases

Presentation 3 spec should be accompanied by processing algorithm(s)

The logic a client should follow when presenting a canvas might be difficult to infer from the spec, especially for potentially very complex scenes possible in Presentation 3 (e.g., #1191).

Many people find a pseudocode algorithm a good way to understand and learn the spec, and build implementations.

We should have one for Presentation 3, especially for laying out a Canvas.

Comparison - the JSON-LD spec has many processing algorithms:
https://www.w3.org/TR/json-ld-api/

CSS styling

CSS styling

(this will usually be the same as the issue name)

Use case

My annotation content needs to be styled (fonts, colours) - how do I do that?

`sequence` Range with partial canvases

sequence Range with partial canvases

(Provide link to index.md of the issue, if available. To be filled in after issue is created - you need the issue number!)

Use case

Likely to be an audio example... cut out the extraneous detail from a field recording.

Audio only from video (and other xxxContentSelector scenarios)

Audio only from video (and other xxxContentSelector scenarios)

(Provide link to index.md of the issue, if available. To be filled in after issue is created - you need the issue number!)

Use case

I have a video, but I only want to present the audio.

Alternative Sequence (via `sequence` Range)

Alternative Sequence (via sequence Range)

(Provide link to index.md of the issue, if available. To be filled in after issue is created - you need the issue number!)

Use case

As well as the default ordering of the images, I wish to provide an alternative ordering (e.g., of a manuscript, or arrangement of archival material).

Multiple images and multiple choices

Multiple images and multiple choices

(Provide link to index.md of the issue, if available. To be filled in after issue is created - you need the issue number!)

Use case

A multispectral set of images for one part of the canvas (e.g., an illumination)

Fragment selectors

Fragment selectors

(Provide link to index.md of the issue, if available. To be filled in after issue is created - you need the issue number!)

Use case

Is this an issue in its own right? Just to show fragment selector syntax? Or is it part of later segment examples?

Image with CSS Rotation

Image with CSS Rotation

(Provide link to index.md of the issue, if available. To be filled in after issue is created - you need the issue number!)

Use case

I want to include an image on the canvas, but it's upside down (or needs other rotation)

Document algorithm for determining embedded or external

Where resources can either be embedded or external references in the API, we should be consistent such that the processing algorithm to determine whether or not a client needs to retrieve the description is clear and easy to implement.

For the majority of cases, the algorithm is "does the items key exist in the data", and any other property is thus allowable.

Transcription of image-based content

Transcription of image-based content

(Provide link to index.md of the issue, if available. To be filled in after issue is created - you need the issue number!)

Use case

How do I provide a transcription of the image(s) in my IIIF resource?

Transcription of content into XML, with XPaths to select a segment

Transcription of content into XML, with XPaths to select a segment

(Provide link to index.md of the issue, if available. To be filled in after issue is created - you need the issue number!)

Use case

I have an audio or video recording of a musical performance, and I have a score that transcribes the performance in MusicXML. I want to link parts of the performance (e.g., bars) to parts of the XML document.

Using Transcripts with A/V Content

Using Transcripts with A/V Content

(Provide link to index.md of the issue, if available. To be filled in after issue is created - you need the issue number!)

Use case

I have transcripts of sound recordings, of video recordings.

Book (simplest, > 1 canvas)

Book (simplest, > 1 canvas)

(Provide link to index.md of the issue, if available. To be filled in after issue is created - you need the issue number!)

Use case

Simplest multi-image example

Linking with a hotspot

Linking (hotspot...)

(Provide link to index.md of the issue, if available. To be filled in after issue is created - you need the issue number!)

Use case

I wish to link from IIIF resources to other web resources, including other IIIF resources.

Add "Variations" to recipe template

Where variations don't need a new recipe, but still require a test fixture of their own.

Examples: - with and without image services (after the first time this is shown)

Image Service for single image

Image Service for single image

(Provide link to index.md of the issue, if available. To be filled in after issue is created - you need the issue number!)

Use case

Minimum viable manifest, enhanced with an image service.

Simple Collections

Paged Collections

(Provide link to index.md of the issue, if available. To be filled in after issue is created - you need the issue number!)

Use case

See IIIF/api#1343

Book (viewingDirection variations)

Book (viewingDirection variations)

(Provide link to index.md of the issue, if available. To be filled in after issue is created - you need the issue number!)

Use case

I have books that read left-to-right; I have scrolls that read top to bottom.

Rights statement(s)

Rights statement(s)

(Provide link to index.md of the issue, if available. To be filled in after issue is created - you need the issue number!)

Use case

My legal department insists that my digital objects be accompanied by certain text.

Start

Start

(Provide link to index.md of the issue, if available. To be filled in after issue is created - you need the issue number!)

Use case

I want the content to initialise somewhere other than its beginning.

Temporal segmentation

Temporal segmentation

(Provide link to index.md of the issue, if available. To be filled in after issue is created - you need the issue number!)

Use case

I want to use only part of an audio recording.

Non-rectangular segmentation

Non-rectangular segmentation

(this will usually be the same as the issue name)

Use case

The region of the image I want to clip is not rectangular.

Annotation in the context of a particular content resource

Annotation in the context of a particular content resource

(this will usually be the same as the issue name)

(Provide link to index.md of the issue, if available. To be filled in after issue is created - you need the issue number!)

Use case

I want to comment on something visible in only one wavelength of light, when the canvas is annotated with a choice of many multispectral images.

See IIIF/iiif-stories#101

Canvas on Canvas

Canvas on Canvas

(Provide link to index.md of the issue, if available. To be filled in after issue is created - you need the issue number!)

Use case

I have an annotated score represented by a canvas; I wish to use it in its entirety, existing annotations and all, in a new canvas.

Table of contents (ranges) - articles in a newspaper

Table of contents (ranges) - articles in a newspaper

(Provide link to index.md of the issue, if available. To be filled in after issue is created - you need the issue number!)

Use case

Logical structure of newspaper down to article level

HTML in Annotations

Comments

(Provide link to index.md of the issue, if available. To be filled in after issue is created - you need the issue number!)

Use case

Example of HTML in an annotation - needs a specific use case (annotation to link to / embed a cat gif/video?)

Bound multi-volume work

Bound multi-volume work

(Provide link to index.md of the issue, if available. To be filled in after issue is created - you need the issue number!)

Use case

Are we talking Sammelband (for which there is a later issue) or are we talking a single-volume Lord of the Rings?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.