Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

📚 Minor changes to improve legibility #269

Merged
merged 2 commits into from
Jul 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions app/services/iiif_print/derivative_rodeo_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ class DerivativeRodeoService
# TODO: Could be nice to have a registry for the DerivativeRodeo::Generators; but that's a
# tomorrow wish.
class_attribute(:named_derivatives_and_generators_by_type, default: {
pdf: { thumbnail: "DerivativeRodeo::Generators::ThumbnailGenerator" },
pdf: {
thumbnail: "DerivativeRodeo::Generators::ThumbnailGenerator"
},
image: {
thumbnail: "DerivativeRodeo::Generators::ThumbnailGenerator",
json: "DerivativeRodeo::Generators::WordCoordinatesGenerator",
Expand Down Expand Up @@ -192,7 +194,7 @@ def lasso_up_some_derivatives(type:, filename:)
input_uris: [input_uri],
preprocessed_location_template: preprocessed_location_template,
output_location_template: output_location_template
).generated_files
).generated_files.first.file_path
rescue => e
message = "#{generator}#generated_files encountered `#{e.class}' “#{e}” for " \
"input_uri: #{input_uri.inspect}, " \
Expand Down
2 changes: 1 addition & 1 deletion iiif_print.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ SUMMARY
spec.files = `git ls-files`.split($OUTPUT_RECORD_SEPARATOR)
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
spec.add_dependency 'blacklight_iiif_search', '~> 1.0'
spec.add_dependency 'derivative-rodeo', "~> 0.4"
spec.add_dependency 'derivative-rodeo', "~> 0.5"
spec.add_dependency 'dry-monads', '~> 1.4.0'
spec.add_dependency 'hyrax', '>= 2.5', '< 4'
spec.add_dependency 'nokogiri', '>=1.13.2'
Expand Down
4 changes: 4 additions & 0 deletions lib/iiif_print/split_pdfs/derivative_rodeo_splitter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ def initialize(filename, file_set:, output_tmp_dir: Dir.tmpdir)
# For example, SpaceStone::Serverless will pre-process derivatives and write them into an S3
# bucket that we then use for IIIF Print.
#
# @note The preprocessed_location_template should end in `.pdf`. The
# {DerivativeRodeo::BaseGenerator::PdfSplitGenerator#derive_preprocessed_template_from}
# will coerce the template into one that represents the split pages.
#
# @return [String]
#
# @see https://github.com/scientist-softserv/space_stone-serverless/blob/7f46dd5b218381739cd1c771183f95408a4e0752/awslambda/handler.rb#L58-L63
Expand Down