craigsapp / website-polish-scores

Front-end for digital transcriptions of the Polish Music Heritage in Open Access project
https://polishscores.org
3 stars 1 forks source link

Drag-and-drop IIIF links #281

Closed craigsapp closed 9 months ago

craigsapp commented 9 months ago

Add links to manifests for IIIF logos on work pages. This will allow drag-and-drop of the IIIF manifest to Mirador or Universal Viewer.

Example work page:

https://polishscores.org/?id=17xx:2157

Screenshot 2024-02-11 at 21 49 22

IIIF logo after link to scan on https://polish.musicsources.pl:

Screenshot 2024-02-11 at 21 49 38

The link should be in this form:

https://dummy.com/?manifest=https%3A%2F%2Frepozytorium.nifc.pl%2Fislandora%2Fobject%2Fpl-kk%253A5733%2Fdatastream%2FIIIF%2Fview

Where https://dummy.com is any computer address. The link copying ignores this computer name an uses the URL parameter manifest to load the IIIF manifest.

Perhaps use https://polishscores.org as the dummy computer address (can be changed later). And in any case prevent clicking on the link from doing anything.

Opening to a specific page (image number) seems possible, but not very obvious how to do that, and may be specific the format/version of the manifest. It involves adding a canvas parameter to the dummy computer name URL.

craigsapp commented 9 months ago

Implemented in issue https://github.com/craigsapp/website-polish-scores/commit/3ee2588bdd68e3baa06be9326666a913ded9a961

The IIIF link on work pages now can be dragged-and-dropped onto https://iiif.humdrum.org

Remove the default item already loaded:

Screenshot 2024-02-12 at 00 17 21

The viewer will look like this:

Screenshot 2024-02-12 at 00 17 10

Then click and drag the IIIF icon on a work page onto the https://iiif.humdrum.org page, and the manifest will be loaded:

Screenshot 2024-02-12 at 00 19 19

The drag-and-drop system prefixes the actual manifest link with:

https://polishscores.org?manifest=

When you click on the IIIF logo on a work page, instead of following this dummy link, you will be taken to the actual manifest:

Screenshot 2024-02-12 at 00 20 45

Not overly useful by itself except for debugging manifests or identifying the version of the manifest being used. You can also use this method to copy the manifest URL and paste into a Mirador interface as described below.

https://iiif.humdrum.org is a clone of Mirador (from a few years ago). On the current Project Mirador demo:

https://mirador-dev.netlify.app/__tests__/integration/mirador

The same click-and-drag is not working. There could be a new system, or it is otherwise not working. Stanford library IIIF links do not work on the new Mirador website as well. Try the IIIF link under the universal viewer on this page:

https://library.stanford.edu/projects/international-image-interoperability-framework/viewers?manifest=https%3A%2F%2Fpurl.stanford.edu%2Fkv814bz5938%2Fiiif%2Fmanifest

In order to use the IIIF link on POPC2 work pages, right click on the logo to copy the manifest:

Screenshot 2024-02-12 at 00 24 40

Then to use on the new Mirador interface (or the one on https://iiif.humdrum.org), click on the blue plus button on the top right of the page:

Screenshot 2024-02-12 at 00 27 25

Then click on the blue "Add resource" button on the bottom right of the following page:

Screenshot 2024-02-12 at 00 27 33

Then paste the manifest address in the "Resource location" field:

Screenshot 2024-02-12 at 00 28 12

Then click the blue "Add" button to add to the list:

Screenshot 2024-02-12 at 00 28 57

Then click on the newly added item to load:

Screenshot 2024-02-12 at 00 29 11

Then remove other items on the page if not done already:

Screenshot 2024-02-12 at 00 29 43

The manifest can be loaded into Universal Viewer as well:

Go to https://universalviewer.io and paste the manifest url, which in this case is

https://repozytorium.nifc.pl/islandora/object/pl-kk%3A5733/datastream/IIIF/view

Screenshot 2024-02-12 at 00 33 37

Then click on View button under the text area:

Screenshot 2024-02-12 at 00 34 19

https://uv-v4.netlify.app/#?manifest=https://repozytorium.nifc.pl/islandora/object/pl-kk%3A5733/datastream/IIIF/view&c=&m=&cv=&xywh=-345%2C-115%2C7459%2C4818

Screenshot 2024-02-12 at 00 35 12