Skip to content
This repository has been archived by the owner on Oct 24, 2024. It is now read-only.

Commit

Permalink
🐛 Update IiifPrint and fix PDF splitting
Browse files Browse the repository at this point in the history
Ref notch8/iiif_print#256

- Updates IiifPrint to include fixes to Derivative Rodeo refactors.
- Fixes incompatibilities in the custom Adventist PDF splitter.
  • Loading branch information
LaRita Robinson committed Jul 5, 2023
1 parent 2b5ae28 commit acd51f1
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -145,5 +145,5 @@ gem 'blacklight_range_limit', '6.5.0'
gem 'dog_biscuits', git: 'https://github.com/samvera-labs/dog_biscuits.git'

gem 'hyrax-v2_graph_indexer', git: 'https://github.com/scientist-softserv/hyrax-v2_graph_indexer', branch: 'main'
gem 'iiif_print', git: 'https://github.com/scientist-softserv/iiif_print.git', branch: 'no-rodeo'
gem 'iiif_print', git: 'https://github.com/scientist-softserv/iiif_print.git', branch: 'main'
gem 'order_already'
16 changes: 13 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,14 @@ GIT

GIT
remote: https://github.com/scientist-softserv/iiif_print.git
revision: eb4f238db71698099f02cbb7c38f84213eca7a66
branch: no-rodeo
revision: 23529a76bef9c90d8ccecd61a8a26c421e0a4ce8
branch: main
specs:
iiif_print (1.0.0)
blacklight_iiif_search (~> 1.0)
derivative-rodeo (~> 0.3)
dry-monads (~> 1.4.0)
hyrax (>= 2.5, < 4.0)
hyrax (>= 2.5, < 4)
nokogiri (>= 1.13.2)
rails (~> 5.0)
rdf-vocab (~> 3.0)
Expand Down Expand Up @@ -275,6 +276,15 @@ GEM
deep_merge (1.2.1)
deprecation (1.1.0)
activesupport
derivative-rodeo (0.4.0)
activesupport (>= 5)
aws-sdk-s3
aws-sdk-sqs
httparty
marcel
mime-types
mini_magick
nokogiri
devise (4.7.2)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
Expand Down
9 changes: 5 additions & 4 deletions lib/iiif_print/split_pdfs/adventist_pages_to_jpgs_splitter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,14 @@ module AdventistPagesToJpgsSplitter
# @note I am adding a {.new} method to a module to mimic the instantiation of a class.
#
# @see https://github.com/scientist-softserv/iiif_print/blob/a23706453f23e0f54c9d50bbf0ddf9311d82a0b9/lib/iiif_print/jobs/child_works_from_pdf_job.rb#L39-L63
# rubocop:disable Metrics/LineLength
def self.new(path, *args, splitter: PagesToJpgsSplitter, suffixes: CreateDerivativesJobDecorator::NON_ARCHIVAL_PDF_SUFFIXES)
def self.call(path,
splitter: PagesToJpgsSplitter,
suffixes: CreateDerivativesJobDecorator::NON_ARCHIVAL_PDF_SUFFIXES,
**args)
return [] if suffixes.any? { |suffix| path.downcase.end_with?(suffix) }

splitter.new(path, *args)
splitter.call(path, args)
end
# rubocop:enable Metrics/LineLength
end
end
end

0 comments on commit acd51f1

Please sign in to comment.