Add annotation lists (WIP, do not merge) #62
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds a basic framework for creating and deploying annotation lists in Wax. The purpose is to make Wax a more full-featured IIIF publishing platform for small but intensively curated digital scholarship projects.
I will add instructions for use to the README.md. The gist is this:
_data/annotations
. They may be preformed IIIF annotation lists (following Presentation API 2.1.1), or simple YAML files that indicate collection, canvas, xywh, and text.bundle exec rake wax:annotations <collection>
to generate the annotation list inimg/derivatives/iiif/annotations/<collection>
bundle exec rake wax:updatemanifest <collection>
to addotherContent
links to the appropriate canvas in the collection manifestThere are a couple of specs for the hocr import process and the manifest update process.
The
updatemanifest
task must be run after the manifest is created. Both tasks could be merged into the main Wax IIIF derivatives tasks or kept as separate tasks. If we prefer to keepwax_tasks
simple, all of this could be put in a separatewax_annotations
gem for optional inclusion.To demonstrate the YAML-based annotation format there is a task,
wax:import:hocr
, which accepts an external HOCR file and generates a YAML file in_data/annotations
(adapted from Ocracoke). We can add other submodules towax:import
as we identify other useful sources of annotations, possibly including:Some TODOs:
wax_theme
, with a good set of default behaviors to display/hide different annotation listswax_iiif
which will be no small job)wax_iiif