-
Notifications
You must be signed in to change notification settings - Fork 0
Mirador Search and Annotations (Prototype)
Please note, the following instructions are to setup a prototype. Not intended for production setup.
- Install and run Simple Annotation Server.
- Change the Islandora IIIF (
iiif_vew_manifest
) branch to search. - Change the Islandora Mirador (
islandora_mirador
) branch toannotations
.- This branch includes a built version of Mirador Viewer in
js/dist
. If you want to make changes to Mirador such as changing the plugins, you will have to rebuild using Mirador integration for Omeka (sas
branch), then replace the files.
- This branch includes a built version of Mirador Viewer in
- Set the Search API URL in Islandora IIIF config (found at
admin/config/islandora/iiif
).http://localhost:8888/search-api/[manifest_id]/search
will work with default setup for Simple Annotation Server. - Set the Annotation API URL in Islandora Mirador config. You must set the URL in both the admin config (found at
admin/config/media/mirador
) and the config for the block (found atadmin/structure/block/manage/miradorblock?destination=/admin/structure/block
).http://localhost:8888/annotation
will work with default setup for Simple Annotation Server. - Create and/or add
field_manifest_id
field to repository objects.
- Navigate to
node/[nid]/book-manifest
, where nid is the node id of the node you wish to annotate. (ie. http://localhost:8000/node/12/book-manifest). - Navigate to http://localhost:8888/uploadManifest.xhtml (Index Manifest URL) in Simple Annotation Server and enter the book manifest URL(s)
- If step 2 is successfully, copy the manifest ID (found in the URL of the page after
manifest=
) and enter it in thefield_manifest_id
of the corresponding node. Previously indexed manifests can be viewed under View Annotations in the Simple Annotation Server. - In a book manifest (ie. http://localhost:8000/node/12/book-manifest), find the canvas URL(s). They should look something like
https:\/\/islandora.traefik.me\/node\/[nid]\/canvas\/[mid]
. - Get input.json for step 6 below at https://cloud.google.com/vision/docs/drag-and-drop, by downloading an page image, and drop it in the UI, copy the response json as input.json, proceed to step 6
- Get annotation list of Google Cloud Vision OCR using gcv2annotationList. Make sure that the canvas URL (You will have to remove the backslashes used to escape the slash characters.) is correct because this is what Simple Annotation Server uses to associate the annotations with the canvas.
- Navigate to Load Annotation List (http://localhost:8888/populate.xhtml) in Simple Annotation Server and enter the URL of the annotation list. You can use a file URI (e.g.
file:///path/to/file
).
- Check the console for CORS blocking requests. This is not currently resolved with the server so you will have to install an extension to turn those off.
- Check for CORS blocking requests. See above.
- Check that you have the correct branch of Islandora Mirador checked out.
- Annotation and Search tabs will not show up in the Mirador Viewer if the URLs are not configured in the module or block settings.
- Download Simple Annotation Server repository:
git clone https://github.com/digitalutsc/SimpleAnnotationServer.git /opt
- Tried the following commands on the playbook:
cd /opt/solr
mkdir -p server/solr/annotations/data
cp -r ../SimpleAnnotationServer/src/main/resources/solr/* server/solr/annotations/
- Change the domain name in the sas.properties from
localhost
to DNS of Solr
sudo nano /opt/SimpleAnnotationServer/src/main/webapp/WEB-INF/sas.properties
- Copy the configs which provided by SimpleAnnotationServer for annotation core:
sudo mkdir -p /var/solr/data/annotations/conf
sudo cp -r /opt/solr/server/solr/annotations /var/solr/data/annotations
- Create an annotations core
cd /opt/solr
sudo chown -R solr:solr /var/solr
sudo -u solr bin/solr create -c annotations -p 8983
5a. For development, run the build of SimpleAnnotationServer, the server should be up running.
cd /opt/SimpleAnnotationServer
sudo mvn jetty:run
5b. For deployment (for UTSC-DSU only), download the following war file (TBD) then run:
sudo java -jar /opt/sas/dependency/jetty-runner.jar --port 8888 /opt/sas/simpleAnnotationStore_dsu_utsc.war &
- Clone and run islandora playbook (https://github.com/digitalutsc/islandora-playbook/tree/mirador_annotation), branch
mirador_annotation
git clone -b mirador_annotation https://github.com/digitalutsc/islandora-playbook.git
cd islandora-playbook
vagrant up
- After the playbook installation is completed. Run the ingest sample objects by following the steps with https://github.com/digitalutsc/islandora_lite_docs/wiki/8.-Ingesting-Content
- Note:: In the section "Execute task", run these two commands below instead:
islandora_workbench$ ./workbench --config islandora_workbench_lite/create_islandora_object-for-playbook.yml
islandora_workbench/islandora_workbench_lite$ ./workbench_islandora_lite --config create_islandora_media-for-playbook.yml
- Access to the playbook with ssh by:
vagrant ssh
-
Apply the reversed proxy by following these steps at https://github.com/digitalutsc/islandora-playbook/blob/mirador_annotation/reverse_proxy.md
Important Note: If images are not loading in Mirador viewer or Openseadragon viewer, reboot the playbook by
vagrant halt
orsudo reboot
(inside the playbook) -
Download Mirador sample configs
cd /opt
sudo git clone https://github.com/digitalutsc/mirador_annotation_configs.git
cd /opt/mirador_annotation_configs/scripts && sudo chmod +x *.sh && sudo ./deploy_annotation.sh
- Start Simple Annotation Server
sudo java -jar /opt/sas/dependency/jetty-runner.jar --port 8888 /opt/sas/simpleAnnotationStore.war &
- Index outcome from Google Vision API for the sample book to Simple annotation Server
sudo ./gen_annotation_list.sh {{ path }}/gcv2annotationList {{ path }}/{{ Spreadsheet has OCR json }}.csv {{ path of output json files }} {{ Drupal account's username }} {{ Drupal account's password }}
-
Visit the book http://localhost:8000/node/12 OR http://localhost:8000/node/38, Full screen the mirador viewer and switch to annotation tab one the left side to see the annotation.
Important note: Currently, there are some issues which prevent tile images loaded in Mirador viewer, while logging in. If so, please logout and then revisit the two books http://localhost:8000/node/12 OR http://localhost:8000/node/38