IiifPrint =================================================== Docs: [![Apache 2.0 License](http://img.shields.io/badge/APACHE2-license-blue.svg)](./LICENSE) [![Contribution Guidelines](http://img.shields.io/badge/CONTRIBUTING-Guidelines-blue.svg)](./CONTRIBUTING.md) Jump in the Samvera Slack: - [Overview](#overview) - [Documentation](#documentation) - [Requirements](#requirements) - [Dependencies](#dependencies) - [Installation](#installation) - [Changes made by the installer:](#changes-made-by-the-installer) - [Configuration to enable IiifPrint features](#configuration-to-enable-iiifprint-features) - [Model level configurations](#model-level-configurations) - [Application level configurations](#application-level-configurations) - [Ingesting Content](#ingesting-content) - [Developing, Testing, and Contributing](#developing-testing-and-contributing) - [Contributing](#contributing) - [Acknowledgements](#acknowledgements) # Overview IiifPrint is a gem (Rails "engine") for [Hyrax](https://hyrax.samvera.org/)-based digital repository applications to support displaying parent/child works in the same viewer (Universal Viewer) and the ability to search OCR from the parent work to the child work(s). IiifPrint is not a stand-alone application. It is designed to be integrated into a new or existing Hyku (v4.0-v5.0) application. Future development will include integrating it into a Hyrax-based application without Hyku and support for [IIIF Presentation Manifest version 3](https://iiif.io/api/presentation/3.0/) along with [AllinsonFlex](https://github.com/samvera-labs/allinson_flex) metadata profiles. IiifPrint supports: * OCR and ALTO creation * full-text search * OCR keyword match highlighting * viewer with page navigation and deep zooming * splitting of PDFs to LZW compressed TIFFs for viewing * adding metadata fields to the manifest with faceted search links and external links * excluding specified work types to be found in the catalog search * external IIIF image urls that work with services such as serverless-iiif or cantaloup A complete list of features can be found [here](https://github.com/scientist-softserv/iiif_print/wiki/Features-List). ## Documentation A set of helpful documents to help you learn more and deploy IiifPrint can be found on the [Project Wiki](https://github.com/scientist-softserv/iiif_print/wiki). IiifPrint was developed against [Hyku](https://github.com/samvera/hyku) v4.0-v5.0. If your application uses [Bulkrax](https://github.com/samvera-labs/bulkrax), please ensure that its version is 5.0.1 or greater. ## Requirements * [Ruby](https://rubyonrails.org/) >=2.4 * [Rails](https://rubyonrails.org/) ~>5.0 * [Bundler](http://bundler.io/) * [Hyrax](https://github.com/samvera/hyrax) v2.5-v3.5.0 - ..._and various [Samvera dependencies](https://github.com/samvera/hyrax#https://github.com/samvera/hyrax#how-to-run-the-code) that entails_. * A Hyrax-based Rails application ## Dependencies * [FITS](https://projects.iq.harvard.edu/fits/home) * [Tesseract-ocr](https://github.com/tesseract-ocr/) * [LibreOffice](https://www.libreoffice.org/) * [ghostscript](https://www.ghostscript.com/) * [poppler-utils](https://poppler.freedesktop.org/) * [ImageMagick](https://github.com/ImageMagick/ImageMagick6) - _ImageMagick policy XML may need to be more permissive in both resources and source media types allowed. See template [policy.xml](config/vendor/imagemagick-6-policy.xml)._ * [libcurl3](https://packages.ubuntu.com/search?keywords=libcurl3) * [libgbm1](https://packages.debian.org/sid/libgbm1) # Installation IiifPrint easily integrates with your Hyrax 2.x applications. * Add `gem 'iiif_print'` to your Gemfile. * Run `bundle install` * Run `rails generate iiif_print:install` * Set config options as indicated below... ## Changes made by the installer: * In `app/assets/javascripts/application.js`, it adds `//= require iiif_print` * Adds `app/assets/stylesheets/iiif_print.scss` * In `app/controllers/catalog_controller.rb`, it adds `include BlacklightIiifSearch::Controller` * In `app/controllers/catalog_controller.rb`, it adds `add_index_field` and `iiif_search` config in the `configure_blacklight` block * Adds `app/models/iiif_search_build.rb` * In `config/routes.rb`, it adds `concern :iiif_search, BlacklightIiifSearch::Routes.new` * In `config/routes.rb`, it adds `concerns :iiif_search` in the `resources :solr_documents` block * Adds `config/initializers/iiif_print.rb` * Adds three migrations, `CreateIiifPrintDerivativeAttachments`, `CreateIiifPrintIngestFileRelations`, and `CreateIiifPrintPendingRelationships` (It may be helpful to run `git diff` after installation to see all the changes made by the installer.) ## Catalog to Universal Viewer search: To enable a feature where the UV automatically picks up the search from the catalog, do the following: * Add `highlight: urlDataProvider.get('q'),` into your uv.html in the `