Code Monkey home page Code Monkey logo

iiif_print's Introduction

IiifPrint

Docs: Apache 2.0 License Contribution Guidelines

Jump in the Samvera Slack:

Overview

IiifPrint is a gem (Rails "engine") for Hyrax-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 along with AllinsonFlex 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.

Documentation

A set of helpful documents to help you learn more and deploy IiifPrint can be found on the Project Wiki.

IiifPrint was developed against Hyku v4.0-v5.0. If your application uses Bulkrax, please ensure that its version is 5.0.1 or greater.

Requirements

Dependencies

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 <script> section.
uv = createUV('#uv', {
    root: '.',
    iiifResourceUri: urlDataProvider.get('manifest'),
    configUri: 'uv-config.json',
    collectionIndex: Number(urlDataProvider.get('c', 0)),
    manifestIndex: Number(urlDataProvider.get('m', 0)),
    sequenceIndex: Number(urlDataProvider.get('s', 0)),
    canvasIndex: Number(urlDataProvider.get('cv', 0)),
    rangeId: urlDataProvider.get('rid', 0),
    rotation: Number(urlDataProvider.get('r', 0)),
    xywh: urlDataProvider.get('xywh', ''),
    embedded: true,
    highlight: urlDataProvider.get('q'), // <-- here's a good spot
    locales: formattedLocales
}, urlDataProvider);
  • Make sure to remove your application's app/helpers/hyrax/iiif_helper.rb and app/views/hyrax/base/iiif_viewers/_universal_viewer.html.erb (if exists)

Configuration to enable IiifPrint features

NOTE: WorkTypes and models are used synonymously here.

Persistence Layer Adapter

We created IiifPrint with an assumption of ActiveFedora. However, as Hyrax now supports Valkyrie, we need an alternate approach. We introduced IiifPrint::Configuration#persistence_layer as a configuration option. By default it will use ActiveFedora methods; but you can switch adapters to use Valkyrie instead. (See IiifPrint::PersistentLayer for more details).

IIIF URL configuration

If you set EXTERNAL_IIIF_URL in your environment, then IiifPrint will use that URL as the root for your IIIF URLs. It will also switch from using the file set ID to using the SHA1 of the file as the identifier. This enables using serverless_iiif or Cantaloupe (refered to as the service) by pointing the service to the same S3 bucket that FCREPO writes the uploaded files to. By setting it up that way you do not need the service to connect to FCREPO or Hyrax at all, both natively support connecting to an S3 bucket to get their data.

Model level configurations

In app/models/{work_type}.rb add include IiifPrint.model_configuration to any work types which require IiifPrint processing features (such as PDF splitting or OCR derivatives). See lib/iiif_print.rb for details on configuration options.

# Example model Book which splits PDFs into child works of
# model Page, and runs only one derivative service (TIFFs)

class Book < ActiveFedora::Base
  include IiifPrint.model_configuration(
    pdf_split_child_model: Page,
    derivative_service_plugins: [
      IiifPrint::TIFFDerivativeService
    ]
  )
end

Application level configurations

In config/initializers/iiif_print.rb specify application level configuration options.

IiifPrint.config do |config|
  # Add models to be excluded from search so the user would not see them in the search results.
  # By default, use the human readable versions like:
  config.excluded_model_name_solr_field_values = ['Generic Work', 'Image']

  # Add configurable solr field key for searching, default key is: 'human_readable_type_sim' if
  # another key is used, make sure to adjust the config.excluded_model_name_solr_field_values to match
  config.excluded_model_name_solr_field_key = 'some_solr_field_key'
end

TO ENABLE OCR Search (from the UV and catalog search)

catalog_controller.rb

  • In the CatalogController, find the add_search_field config block for 'all_fields'. Add advanced_parse: false as seen in the following example:
    config.add_search_field('all_fields', label: 'All Fields', include_in_advanced_search: false, advanced_parse: false) do |field|
      all_names = config.show_fields.values.map(&:field).join(" ")
      title_name = 'title_tesim'
      field.solr_parameters = {
        qf: "#{all_names} file_format_tesim all_text_timv",
        pf: title_name.to_s
      }
    end
  • Set config.search_builder_class = IiifPrint::CatalogSearchBuilder to remove works from the catalog search results if is_child_bsi: true
  • Ensure that all text search is configured in default_solr_params config block:
    config.default_solr_params = {
      qt: "search",
      rows: 10,
      qf: "title_tesim description_tesim creator_tesim keyword_tesim all_text_timv"
    }

To remove child works from recent works on homepage

homepage_controller.rb

  • In the HomepageController, change the search_builder_class to remove works from recent_documents if is_child_bsi: true
    require "iiif_print/homepage_search_builder"

    def search_builder_class
      IiifPrint::HomepageSearchBuilder
    end

Skipping Certain File Suffixes for PDF Splitting

By default when a work is configured for splitting PDFs, we will split all PDFs. However, in some cases you don't want to split based on the file name's suffix. In that case, configure code as follows:

IiifPrint.config do |config|
  config.skip_splitting_pdf_files_that_end_with_these_texts = ['.reader.pdf']
end

Derivative Rodeo Configuration

The Derivative Rodeo is used in two ways:

  • Configuring the Hyrax::DerivativeService by adding IiifPrint::DerivativeRodeoService
  • Enable Derivative Rodeo PDF Splitting service by IiifPrint.model_configuration

Configuring Hyrax::Derivative

In the application initializer:

      Hyrax::DerivativeService.services = [
        IiifPrint::DerivativeRodeoService,
        Hyrax::FileSetDerivativesService]

Enabling Derivative Rodeo PDF Splitting

The IiifPrint.model_configuration method allows for specifying the pdf\_splitter\_service as below:

class Book < ActiveFedora::Base
  include IiifPrint.model_configuration(
            pdf_splitter_service: IiifPrint::SplitPdfs::DerivativeRodeoSplitter
          )
end

Pre-Process Location

The DerivativeRodeo allows for specifying a location where you've done pre-processing (e.g. you ran splitting and derivative generation in AWS's Lambda).

By default the preprocess location is S3, as that is where SoftServ has been running pre-processing. However that default may not be adequate for local development.

Conditional Derivative Generation

The [IiifPrint::DerivativeRodeoService][./app/services/iiif_print/derivative_rodeo_service.rb] provides a means of specifying the derivatives to generate via two configuration points:

  • IiifPrint::DerivativeRodeoService.named_derivatives_and_generators_by_type
  • IiifPrint::DerivativeRodeoService.named_derivatives_and_generators_filter

In the case of named_derivatives_and_generators_by_type, we're saying all mime categories will generate these derivatives.

In the case of named_derivatives_and_generators_filter, we're providing a point where we can specify for each file_set and filename the specific derivatives to accept/reject/append to the named derivative generation.

See their examples for further configuration guidance.

Ingesting Content

IiifPrint supports a range of different ingest workflows:

  • single-item ingest via the UI
  • batch ingest of works from local files or remote files via Bulkrax

The ingest process is configurable at the model level, granting the option to:

  • split a PDF into TIFFs and create child works
  • create a full complement of derivatives, including TIFF, JP2, PDF, OCR text, and word-coordinate JSON

Developing, Testing, and Contributing

We develop the IIIF Print gem using Docker and Docker Compose. You'll want to clone this repository and run the following commands:

$ docker compose build
$ docker compose up
$ docker compose exec web bash

You'll now be inside the web container:

$ bundle exec rake

The above will build the test application (if it doesn't already exist). During the rebuild you might get a notice on a conflict for files. It will ask you to override. We recommend that you select the "accept all" option (e.g. Typing a).

To rebuild the test application, delete the .internal_test_app directory.

Contributing

If you're working on a PR for this project, create a feature branch off of main.

This repository follows the Samvera Community Code of Conduct and language recommendations. Please do not create a branch called master for this repository or as part of your pull request; the branch will either need to be removed or renamed before it can be considered for inclusion in the code base and history of this repository.

We encourage anyone who is interested in newspapers and Samvera to contribute to this project. How can I contribute?

Acknowledgements

IIIF Print is a gem that was forked off Newspaper Works, a powerful and versatile library for working with digitized newspapers. We would like to thank the team and maintainers of Newspaper Works for creating such a useful and well-designed gem. Our work on IIIF Print would not have been possible without their hard work and dedication.

In particular, we would like to express our gratitude to brianmcbride, seanupton, ebenenglish, and JacobR for their pioneering efforts on Newspaper Works. Their foundation and expertise were invaluable in the development of this gem.

Thank you to the entire Newspaper Works team for creating and maintaining such a valuable resource for the Samvera community.

iiif_print's People

Contributors

alishaevn avatar brianmcbride avatar deonfranklin avatar ebenenglish avatar jacobr avatar jeremyf avatar kelynch avatar kirkkwang avatar laritakr avatar orangewolf avatar seanupton avatar shanalmoore avatar wickr avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

cziaarm

iiif_print's Issues

reconcile iiif_manifest_presenter.rb with Hyku's iiif_manifest_presenter_decorator.rb. do not do both a decorator and a full override

ref #62

Summary

ref LV: https://github.com/scientist-softserv/louisville-hyku/blob/42a0fc837fd9ef4832a9741731672200e0097305/app/presenters/hyrax/iiif_manifest_presenter.rb

ref HYKU: https://github.com/samvera/hyku/blob/main/app/presenters/hyrax/iiif_manifest_presenter_decorator.rb

Compare the differences between these two files and decide which one we should take.

We also may also need to take account the difference between Hyrax and Hyku. Site.account is hyku specific since Hyrax doesn't have concept of tenants.

Acceptance Criteria

  • [ ]

Screenshots or Video

Testing Instructions

Notes

Confused how to fill this out? Check out the playbook

make it easy to turn on or off derivative services at a class level

Summary

We currently don't have a way to select what type of derivatives to make.

ie: "for this work type, only make tiffs and not pdfs" or "don't OCR"...

There is currently no way to turn this on and off for a given class.

Acceptance Criteria

  • a user should be able to select what types of derivatives a work type should create

Testing Instructions

  • if a user turns a type of derivative off, the create derivatives job should not make that type of derivative for that particular work type
  • Perhaps all derivative types should get created by default?
  • Example scenarios to test:

As developer

I want to create all derivatives available from IIIF Print for my Image work type:

# Image model
class Image < ActiveFedora::Base
  include IiifPrint.model_configuration
end

I want to create just TIFF derivatives:

class Image < ActiveFedora::Base
  include IiifPrint.model_configuration(
    derivative_service_plugins: [
      IiifPrint::TIFFDerivativeService
    ]
  )
end

I want to create all JP2, PDF, and text derivatives but not TIFF:

class Image < ActiveFedora::Base
  include IiifPrint.model_configuration(
    derivative_service_plugins: [
      IiifPrint::JP2DerivativeService,
      IiifPrint::PDFDerivativeService,
      IiifPrint::TextExtractionDerivativeService
    ]
  )
end
  • once adjusted, deploy the application to staging and create a new Image
  • go to the show page and down below in the items partial, see that the download options match expectations

Fix OCR UV search

Summary

This appears to be broken. This ticket is to figure out why. Did we miss porting over necessary code from LV? (#iiif_search is missing in iiif_print)

Image

Is full or all text getting indexed? etc...

Acceptance Criteria

  • From any work's UV, when a user searches for text of a PDF/image and there's a match, it should be highlighted in the UV
  • From the Parent UV, when a user searches for OCR it's child's PDF/image and there's a match, it should be highlighted in the UV

Highlighted in UV means that the word will be highlighted in the image it matches with. Additionally, a blue box will be highlighted in the left pane, of the matched work. Examples from LV:

Screen_Shot_2022-05-12_at_11 18 36_AM

Screen_Shot_2022-09-20_at_7 07 48_PM

Screenshots or Video

Image

image

Testing Instructions

  1. Create a work. Upload an image that has text. OCR should run. Confirm that json coordinates are created as its derivatives. Confirm that a user can search for the text in the UV, and find a match.
  2. Create a work. Attach a child. Confirm that a user can visit the parent's UV, search for the child's metadata and find a match.

Notes

The commits in Louisville that worked towards this are:

maybe helpful refs:

  1. https://gitlab.com/notch8/louisville-hyku/-/merge_requests?scope=all&state=merged&search=ocr

If things aren't working, try...

ActiveFedora::Base.reindex_everything

modify `search_builders/concerns/iiif_print/exclude_models` to make it easy to set which models do not show up in search at a work type model level

Summary

exclude_models should be configurable.

Acceptance Criteria

  • A developer should be able to exclude certain models from search within the application

Screenshots or Video

https://drive.google.com/file/d/1b9gK-eA5wih1GDiT4PCwFRKEGWo_PC4_/view?usp=share_link

Testing Instructions

  • Add 'Image' to the excluded work from the config
    • eg. config.models_to_be_excluded_from_search = [] in config\initializers\iiif_pring.rb within your Hyku application
  • Search for the Image
  • Confirm it does not show up

Notes

Confused how to fill this out? Check out the playbook

Fix OCR Catalog Search

Summary

Is full or all text getting indexed? etc...

Acceptance Criteria

Screenshots or Video

Testing Instructions

Deploy i87-ocr-search to hyku-iiif (hyku branch) โœ… visit: demo.hyku-iiif.notch8.cloud/

  1. Create a work. Upload an image that has text. OCR should run. Confirm that json coordinates are created as its derivatives. Confirm that a user can search for the text in the UV, and find a match.
  2. Create a work. Attach a child. Confirm that a user can visit the parent's UV, search for the child's metadata and find a match.
  3. A user should able be able to catalog search the child metadata and have its parent return
  4. A user should be able to catalog search the child's ocr term and have its parent return

Notes

The commits in Louisville that worked towards this are:

maybe helpful refs:

  1. https://gitlab.com/notch8/louisville-hyku/-/merge_requests?scope=all&state=merged&search=ocr

If things aren't working, try...

ActiveFedora::Base.reindex_everything

Generator check / Install IiifPrint into Hyku

THIS SHOULD BE TESTED LOCALLY

This ticket is meant to be done towards the end of the iiif_print epic

We want to confirm that the generator does everything it needs to, when installing iiif_print onto a hyrax/hyku project.

  • Test generator by installing iiifprint on hyku main
  • We ultimately will be merging iiif_print into hyku so this ticket can be treated as a 2 for 1. (as in tested generator locally and confirm all is good, but also make a PR out of it).

NOTES:

#121 Generator Refactor

Screenshots / Video

Tested on https://demo.hyku-iiif.notch8.cloud

Sample Files:

Expected Behavior

User should be able to perform all that's listed in the features list's user story tab

Testing Instructions

A user should perform all that is defined in the user story tab of the Features List

check each css file, eliminate the ones we do not need

Summary

Review the css files in iiif_print and remove the unnecessary/un-usued files.

Acceptance Criteria

  • Review the following scss files:
    • ./app/assets/stylesheets/iiif_print/_issue_search.scss
    • ./app/assets/stylesheets/iiif_print/_issues_calendar.scss
    • ./app/assets/stylesheets/iiif_print/_search_results.scss
    • ./app/assets/stylesheets/iiif_print/_newspapers_search.scss
    • ./app/assets/stylesheets/iiif_print/_iiif_print.scss
    • ./lib/generators/iiif_print/templates/iiif_print.scss
  • Remove any classes/ids not being used

Replace `IndexesRelationships` with more flexible relationship indexing (from Louisville). Left file for the moment for inspiration

Summary

Replace iiif_print's Indexes_relationship with louisville's implementation.

ref set_child_flag.rb

Acceptance Criteria

  • IndexesRelationships is replaced by more flexible relationship indexing

Testing Instructions

  • after importing a csv w parent/children, check the is_child property on the children via the rails console. It should exist and it should be set to true.

Spike: Confirm OCR works

Summary

Confirm that Full Text Search is working. Record findings. Close this ticket if:

  1. it's working
  2. it's not working but implementation tickets have been created

Acceptance Criteria

  • When a user searches for text of a PDF/image and there's a match, it should be highlighted in the UV
  • When a user searches for child metadata and there's a match, it should be highlighted in the UV

Screenshots or Video

Testing Instructions

  1. Create a work. Upload an image that has text. OCR should run. Confirm that json coordinates are created as its derivatives. Confirm that a user can search for the text in the UV, and find a match.
  2. Create a work. Attach a child. Confirm that a user can visit the parent's UV, search for the child's metadata and find a match.

Notes

Confused how to fill this out? Check out the playbook

Separate IiifPrint to its own repo

Summary

It's far to easy to accidentally submit PRs against the Newspaper Gem. We need to break the fork so that by default, PRs get submitted to IiifPrint repo.

Acceptance Criteria

  • PRs get merged into IiifPrint repo by default.

Screenshots or Video

image

Testing Instructions

Notes

community/community#11729 (comment)

port app/services/hyrax/manifest_builder_service_decorator to the iiif_print gem

Summary

File now exists, but needs to be made functional. Specifically for IIIF manifest 2 and 3

ref: https://github.com/scientist-softserv/iiif_print/blob/main/lib/generators/iiif_print/templates/manifest_builder_service_decorator.rb

Indiana is open to upgrading their manifest.

Heads Up: Indiana has a configuration to pull in the metadata into the manifest. This will need some work, and we also may need to consider how it will work with AllinsonFlex.

The end goal is for the UV to display the way that LV has it.


Acceptance Criteria

  • When looking at the works show page, works with metadata should display their metadata in the Universal Viewer right side panel

Screenshots or Video

Testing Instructions

https://demo.hyku-iiif.notch8.cloud/

  • Create a work with some metadata properties
  • Navigate to its show page
  • Open the right side panel and confirm the metadata shows up

Notes

  • AllinsonFlex handling will need to be apart of a different ticket #298
  • Essi uses this implementation where it seems there is select metadata to be displayed
  • Essi's implementation does not support facetable links fro the UV metadata panel
  • Essi uses IIIF Presentation Manifest V2 which is the Hyrax 2x default, while UTK (on Hyrax 3x) uses IIIF Presentation Manifest V3

Write up a test plan

Summary

Ask Diem to share template for test plan
Ask Rob to review test plan

Acceptance Criteria

  • [ ]

Screenshots or Video

Testing Instructions

Notes

Confused how to fill this out? Check out the playbook

update README / gemspec

Summary

Make a helpful readme for this gem. Considering using referencing this template for inspiration.

Please also include a section for configurations and Hyrax.

Acceptance Criteria

A dev should be able to apply this gem to their hyku/hyrax projects with little to no questions.

Testing Instructions

Recruit an unfamiliar dev to install this gem in hyku proper.

Specs for createIssuePageJob work

Summary

ref: #11 and #83

We spun off this ticket to unblock the rest of the iiif_print work. Specs are marked with # TODO

Acceptance Criteria

Complete following specs:

  • spec/lib/iiif_print/jobs/child_works_from_pdf_job_spec.rb
  • spec/lib/iiif_print/jobs/create_relationship_job_spec.rb
  • spec/lib/iiif_print/split_pdfs/pages_into_images_service_spec.rb
  • Consider merging spec/support/iiif_print_models.rb with misc_shared.rb for more functional test fixtures, and adjust other specs using the models.

Spike: Refactor code from Louisville in to iiif_print gem

Treat this checklist as a spike. Do the investigation pieces and then move anything with substantial work it its own ticket.

Notes

ref #6

Acceptance

New tickets are made for any substantive work and the trivial stuff is done.

Checklist

  • do we need to bring over config/initializers/iiif_manifest.rb from Louisville?
    • looks like an override just to make sure all manifests have a viewingHint of paged, I don't think we want this
  • hydra derivative image decorator override should be pushed to image processors
  • port lib/rdf/custom_is_child_term.rb from Louisville
  • set_child_works.rake from lousiville
  • do we need the modifications from def manifest and def iiif_manifest_presenter found in app/controllables/concerns/hyrax/works_controller_behavior.rb?
    • #manifest was changed because of this and it looks like #iiif_manifest_presenter is passing in curation_concern_from_search_results which is being deprecated
  • Louisville has a app/helpers/newspaper_works_helper.rb did a iiif_print version get created by the generator?
    • yes
  • get all_decendant-file_sets and ancestor_ids from app/indexers/app_index.rb and put it in iiif_print indexer mixin
  • get app/indexers/hyrax/file_set_indexer and put it in a iiif_print mixin
  • port app/models/concerns/set_child_flag to iiif_print, include in work types
  • #26
    • doesn't look like it
  • #27
    • seems like it would be useful, not sure where else to put it if not in the helper
  • #28
    • i think the more the gem can handle the better
  • #29
  • #30
  • #31
  • #32
  • #33
  • #34
  • #35
  • #36
  • #37
  • #38

๐ŸŽ Make the UV display records in the same order as the items section of the show page.

Summary

The order of the works that are displayed in the items partial in the work show page does not always match the way the UV's display order.

Acceptance Criteria

  • Both UV and items partial show the same order

Screenshots or Video

Testing Instructions

  • A dev should set the sort_iiif_manifest_canvases_by to :date_created in the configuration
  • Deploy the branch
  • The tester should import this CSV via Bulkrax sw.csv
  • Confirm that the items at the bottom of the show page displays in the same order as the UV

Parent UV doesn't render when it doesn't have a fileset

Summary

spin off ticket from i37

The parent UV does not render when it doesn't have filesets. It should still render if it has children.

Acceptance Criteria

  • If a parent work has no files && has children (with filesets), it should still render in the parent's UV.

Screenshots or Video

image

Testing Instructions

Notes

Confused how to fill this out? Check out the playbook

clean up the translations files

Summary

Use a Gem to identify which translations are not being used. We will want to remove them and re run the generator to translate. You should only have to focus on removing the english translations.

I suspect the translator generator will be based of of the english locale file, meaning that if translations get removed there it will automatically remove them from other languages.

Acceptance Criteria

  • all unnecessary translations will no longer exist in the project
  • re run translations to update non-english locale files

Testing Instructions

This issue may not be testable from a QA perspective, besides ensuring that nothing is broken after its done. For example, there should be no missing translation errors anywhere.

Notes

a GOOGLE_API_KEY is needed to run the translator. You can find this in 1password, however, I believe it may need to get updated.

The last time it was used, we received a message that we reached the maximum usage threshold. See Kirk/BL.

Make IIIF Print split remote PDF URLs in Bulkrax

IIIF Print bulkrax imports do not work with remote PDF files. They create the parent work and fileset only.

The following file should be imported into a parent GenericWork AND ALSO create a child Image TIFF work.

i97-sample-remote-fileset.csv

Note: a CSV with the remote url in the GenericWork row will NOT work. This would require changes to bulkrax.

Manage errors due to invalid PDF files

When a PDF doesn't have the appropriate information, the PagesIntoImagesService cannot break it into TIFFs.

The service defines invalid_pdf? which specifies all of the information which is needed by the service. This method could be put into use somewhere in ChildWorksFromPdfJob to prevent the job from indefinitely retrying due to the error, and possibly reporting the error as well.

Image

refacor IiifPrint::Actors::IiifPrintUploadActor

Summary

  • figure out use of or remove ensure_title
  • instead of keying off Newspaper issue class, check if class includes a SplitPdf concern. create such a concern

Acceptance Criteria

  • [ ]

Screenshots or Video

Testing Instructions

Notes

Confused how to fill this out? Check out the playbook

Clean up specs

Summary

Clean up specs.

There's a lot of unused and failing specs due to us taking some but not all pieces of code from the newspaper gem.

Additionally, partially due to the mess, please also review the spec coverage for the new features.

Acceptance Criteria

  • Goal is 80% coverage per samvera labs' standards (fact check this)

Screenshots or Video

Testing Instructions

Notes

`MetadataBuilderService` should handle properties generated by AllinsonFlex

Summary

The MetadataBuilderService should also handle metadata properties that were generated from AllinsonFlex in both version 2 and version 3 manifests.

Acceptance Criteria

  • Metadata is shown for items on an application with AllinsonFlex installed.

Screenshots or Video

Testing Instructions (UTK staging)

In an application installed with AllinsonFlex

  • Navigate to a work with an image that shows in the Universal Viewer
  • Check that the metadata is showing in the right panel
    • Add a few more metadata to other properties to double check it works

Spike: verify that running the generators gets you all the needed adjustments for iiif search found in lousiville app/controller/catalog_controller.rb

Summary

verify that running the generators gets you all the needed adjustments for iiif search found in lousiville app/controller/catalog_controller.rb

Acceptance Criteria

  • [ ]

Screenshots or Video

Testing Instructions

Notes

Implementation suggestion:

run the generator from iiif print main on a clean hyku and then compare the CatalogController of each spot and take note of the diff.

Verify that specs are adaquate for iiif_print SS QA column

Summary

Verify that there are specs before closing out the iiif_print tickets for SoftServe QA. These tickets are not quite QA-able and their behaviors will be covered by a test plan.

Acceptance Criteria

Does each PR have a good spec? ref: https://github.com/orgs/scientist-softserv/projects/43/views/1?filterQuery=label%3Aiiif_print+status%3A%22SoftServ+QA%22

If so

  • move ticket to done

if not

  • add specs and leave a comment noting the ticket number that got updated.

Screenshots or Video

Testing Instructions

Notes

Confused how to fill this out? Check out the playbook

make `CreateIssuePageJob` more generic

Summary

CreateIssuePageJob should be more generic.

class method that should take an argument of what type of class it should split it into. ie #split_pdf_into("Book")

Currently the newspaper gem doesn't give you a choice. All created children are type NewspaperPage.

ref: https://github.com/samvera-labs/newspaper_works/blob/bbe8736b0cf622d9c2577faf7a6f0a4e8dd1452c/lib/newspaper_works/ingest/newspaper_issue_ingest.rb#L41

Acceptance Criteria

  • CreateIssuePageJob is more generic
  • #split_pdf_into takes an argument of a work type

`MetadataBuilderService` should handle version 3 manifests

Summary

The MetadataBuilderService should also handle IIIF version 3 manifests as well.

Acceptance Criteria

  • Metadata is shown for items on a version 3 manifest

Screenshots or Video

Testing Instructions (test w BL)

  • Navigate to a work has an image that you can see in the Universal Viewer
  • Open the right side panel and confirm there is metadata
  • in the URL append /manifest.json (delete any locale stuff)
  • confirm in the context that is is a presentation/3/context.json

Spike: add derived_members and derived_files override to app/presenters/work_show_presenter

Attempt to answer why these methods exist. Is it necessary to keep or transfer over to iiif_print?

  • is it related to this?

Next Steps

Close this ticket if these methods are not required, or after creating a new ticket that'll implements them in iiif_print.

Spike: Should we bring over LV's #total_pages method and implementation

Summary

This ticket got created in response to Kirk's PR: #80 (review)

He brought over a decorator from LV which included an override for #total_pages.

Research why this method was overridden and decide whether or not we want to implement the same for iiif_print

Acceptance Criteria

  • Close this ticket if, after research, we decide this is not needed or we create a new implementation ticket

Screenshots or Video

Testing Instructions

Notes

Confused how to fill this out? Check out the playbook

Make IIIF Print split when parent and fileset are in separate rows of CSV

IIIF Print bulkrax imports do not work when the parent work and fileset information in the csv are in separate rows. The iiif print actor does not trigger when the parent work is created because there are no attached files. We need to identify how to trigger it as the file sets are created without affecting the functionality of normal processing of the parent and files together.

The following file should be imported into a parent GenericWork AND ALSO create a series of child Image TIFF works.

i98-sample.zip

Note: This should also work for remote PDF urls in a separate row once Make IIIF Print split remote PDF URLs in Bulkrax is working.

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.