iiif_print 1.0.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (181) hide show
  1. checksums.yaml +4 -4
  2. data/.github/ISSUE_TEMPLATE.md +18 -0
  3. data/.github/PULL_REQUEST_TEMPLATE.md +16 -0
  4. data/.github/workflows/build-lint-test-action.yaml +4 -5
  5. data/.gitignore +5 -4
  6. data/.rubocop.yml +1 -0
  7. data/.solargraph.yml +19 -0
  8. data/Gemfile.lock +1025 -0
  9. data/README.md +102 -9
  10. data/Rakefile +6 -0
  11. data/app/actors/iiif_print/actors/cleanup_file_sets_actor_decorator.rb +24 -0
  12. data/app/actors/iiif_print/actors/file_set_actor_decorator.rb +30 -28
  13. data/app/controllers/iiif_print/split_pdfs_controller.rb +38 -0
  14. data/app/helpers/iiif_print/iiif_helper_decorator.rb +32 -0
  15. data/app/helpers/iiif_print/iiif_print_helper_behavior.rb +23 -0
  16. data/app/helpers/iiif_print_helper.rb +0 -20
  17. data/app/indexers/concerns/iiif_print/child_work_indexer.rb +27 -0
  18. data/app/indexers/concerns/iiif_print/file_set_indexer.rb +45 -17
  19. data/{lib → app/jobs}/iiif_print/jobs/application_job.rb +2 -1
  20. data/app/jobs/iiif_print/jobs/child_works_from_pdf_job.rb +153 -0
  21. data/app/jobs/iiif_print/jobs/create_relationships_job.rb +117 -0
  22. data/app/jobs/iiif_print/jobs/request_split_pdf_job.rb +31 -0
  23. data/app/listeners/iiif_print/listener.rb +31 -0
  24. data/app/models/concerns/iiif_print/set_child_flag.rb +10 -1
  25. data/app/models/concerns/iiif_print/solr/document.rb +19 -3
  26. data/app/models/iiif_print/iiif_search_decorator.rb +35 -0
  27. data/app/models/iiif_print/iiif_search_response_decorator.rb +25 -2
  28. data/app/models/iiif_print/pending_relationship.rb +3 -0
  29. data/app/presenters/iiif_print/file_set_presenter_decorator.rb +11 -0
  30. data/app/presenters/iiif_print/iiif_manifest_presenter_behavior.rb +120 -0
  31. data/app/presenters/iiif_print/iiif_manifest_presenter_factory_behavior.rb +1 -1
  32. data/app/presenters/iiif_print/work_show_presenter_decorator.rb +23 -11
  33. data/app/search_builders/concerns/iiif_print/allinson_flex_fields.rb +15 -0
  34. data/app/search_builders/concerns/iiif_print/highlight_search_params.rb +2 -1
  35. data/app/services/iiif_print/derivative_rodeo_service.rb +382 -0
  36. data/app/services/iiif_print/manifest_builder_service_behavior.rb +90 -31
  37. data/app/services/iiif_print/pluggable_derivative_service.rb +8 -10
  38. data/app/services/iiif_print/simple_schema_loader_decorator.rb +11 -0
  39. data/app/transactions/hyrax/transactions/iiif_print_container_decorator.rb +34 -0
  40. data/app/transactions/hyrax/transactions/steps/conditionally_destroy_children_from_split.rb +32 -0
  41. data/app/transactions/hyrax/transactions/steps/delete_all_file_sets_decorator.rb +35 -0
  42. data/app/views/catalog/_index_header_list_default.html.erb +13 -0
  43. data/app/views/hyrax/base/_representative_media.html.erb +4 -3
  44. data/app/views/hyrax/base/iiif_viewers/_universal_viewer.html.erb +1 -1
  45. data/app/views/hyrax/file_sets/_show_actions.html.erb +24 -0
  46. data/config/initializers/simple_schema_loader.rb +1 -0
  47. data/config/locales/iiif_print.en.yml +4 -0
  48. data/config/metadata/child_works_from_pdf_splitting.yaml +21 -0
  49. data/config/routes.rb +3 -0
  50. data/db/migrate/20181214181358_create_iiif_print_derivative_attachments.rb +8 -6
  51. data/db/migrate/20190107165909_create_iiif_print_ingest_file_relations.rb +7 -5
  52. data/db/migrate/20230109000000_create_iiif_print_pending_relationships.rb +8 -6
  53. data/db/migrate/20231110163052_add_model_details_to_iiif_print_pending_relationships.rb +7 -0
  54. data/docker-compose.yml +2 -2
  55. data/iiif_print.gemspec +11 -10
  56. data/lib/generators/iiif_print/install_generator.rb +21 -1
  57. data/lib/generators/iiif_print/templates/config/initializers/iiif_print.rb +11 -4
  58. data/lib/generators/iiif_print/templates/helpers/iiif_print_helper.rb +5 -0
  59. data/lib/iiif_print/base_derivative_service.rb +14 -2
  60. data/lib/iiif_print/blacklight_iiif_search/annotation_decorator.rb +58 -6
  61. data/lib/iiif_print/catalog_search_builder.rb +7 -3
  62. data/lib/iiif_print/configuration.rb +205 -8
  63. data/lib/iiif_print/data/fileset_helper.rb +3 -3
  64. data/lib/iiif_print/data/work_derivatives.rb +4 -4
  65. data/lib/iiif_print/engine.rb +53 -15
  66. data/lib/iiif_print/errors.rb +18 -0
  67. data/lib/iiif_print/homepage_search_builder.rb +17 -0
  68. data/lib/iiif_print/image_tool.rb +12 -8
  69. data/lib/iiif_print/jp2_derivative_service.rb +4 -1
  70. data/lib/iiif_print/lineage_service.rb +47 -13
  71. data/lib/iiif_print/metadata.rb +67 -48
  72. data/lib/iiif_print/pdf_derivative_service.rb +3 -1
  73. data/lib/iiif_print/persistence_layer/active_fedora_adapter.rb +189 -0
  74. data/lib/iiif_print/persistence_layer/valkyrie_adapter.rb +183 -0
  75. data/lib/iiif_print/persistence_layer.rb +118 -0
  76. data/lib/iiif_print/split_pdfs/base_splitter.rb +153 -0
  77. data/lib/iiif_print/split_pdfs/child_work_creation_from_pdf_service.rb +83 -37
  78. data/lib/iiif_print/split_pdfs/derivative_rodeo_splitter.rb +166 -0
  79. data/lib/iiif_print/split_pdfs/destroy_pdf_child_works_service.rb +22 -0
  80. data/lib/iiif_print/split_pdfs/pages_to_jpgs_splitter.rb +19 -0
  81. data/lib/iiif_print/split_pdfs/pages_to_pngs_splitter.rb +26 -0
  82. data/lib/iiif_print/split_pdfs/pages_to_tiffs_splitter.rb +41 -0
  83. data/lib/iiif_print/split_pdfs/pdf_image_extraction_service.rb +64 -59
  84. data/lib/iiif_print/text_extraction/hocr_reader.rb +7 -3
  85. data/lib/iiif_print/text_extraction/page_ocr.rb +5 -4
  86. data/lib/iiif_print/text_extraction_derivative_service.rb +4 -2
  87. data/lib/iiif_print/text_formats_from_alto_service.rb +3 -1
  88. data/lib/iiif_print/tiff_derivative_service.rb +3 -1
  89. data/lib/iiif_print/version.rb +1 -1
  90. data/lib/iiif_print.rb +210 -20
  91. data/lib/samvera/derivatives/configuration.rb +83 -0
  92. data/lib/samvera/derivatives/hyrax.rb +129 -0
  93. data/lib/samvera/derivatives.rb +238 -0
  94. data/tasks/copy_authorities_to_test_app.rake +11 -0
  95. data/tasks/iiif_print_dev.rake +4 -4
  96. metadata +111 -196
  97. data/app/helpers/hyrax/iiif_helper.rb +0 -22
  98. data/app/indexers/concerns/iiif_print/child_indexer.rb +0 -34
  99. data/app/views/hyrax/file_sets/_actions.html.erb +0 -45
  100. data/bin/rails +0 -13
  101. data/lib/iiif_print/jobs/child_works_from_pdf_job.rb +0 -107
  102. data/lib/iiif_print/jobs/create_relationships_job.rb +0 -78
  103. data/lib/iiif_print/split_pdfs/pages_into_images_service.rb +0 -130
  104. data/spec/.keep.txt +0 -1
  105. data/spec/factories/ability.rb +0 -6
  106. data/spec/factories/newspaper_issue.rb +0 -7
  107. data/spec/factories/newspaper_page.rb +0 -7
  108. data/spec/factories/newspaper_page_solr_document.rb +0 -12
  109. data/spec/factories/newspaper_title.rb +0 -8
  110. data/spec/factories/uploaded_pdf_file.rb +0 -9
  111. data/spec/factories/uploaded_txt_file.rb +0 -9
  112. data/spec/factories/user.rb +0 -13
  113. data/spec/fixtures/files/4.1.07.jp2 +0 -0
  114. data/spec/fixtures/files/4.1.07.tiff +0 -0
  115. data/spec/fixtures/files/README.md +0 -7
  116. data/spec/fixtures/files/alto-2-0.xsd +0 -714
  117. data/spec/fixtures/files/broken-truncated.pdf +0 -0
  118. data/spec/fixtures/files/credits.md +0 -16
  119. data/spec/fixtures/files/lowres-gray-via-ndnp-sample.tiff +0 -0
  120. data/spec/fixtures/files/minimal-1-page.pdf +0 -0
  121. data/spec/fixtures/files/minimal-2-page.pdf +0 -0
  122. data/spec/fixtures/files/minimal-alto.xml +0 -31
  123. data/spec/fixtures/files/ndnp-alto-sample.xml +0 -24
  124. data/spec/fixtures/files/ndnp-sample1-json.json +0 -1
  125. data/spec/fixtures/files/ndnp-sample1-txt.txt +0 -1
  126. data/spec/fixtures/files/ndnp-sample1.pdf +0 -0
  127. data/spec/fixtures/files/ocr_alto.xml +0 -202
  128. data/spec/fixtures/files/ocr_alto_scaled_4pts_per_px.xml +0 -202
  129. data/spec/fixtures/files/ocr_color.tiff +0 -0
  130. data/spec/fixtures/files/ocr_gray.jp2 +0 -0
  131. data/spec/fixtures/files/ocr_gray.tiff +0 -0
  132. data/spec/fixtures/files/ocr_mono.tiff +0 -0
  133. data/spec/fixtures/files/ocr_mono_text_hocr.html +0 -78
  134. data/spec/fixtures/files/page1.tiff +0 -0
  135. data/spec/fixtures/files/sample-4page-issue.pdf +0 -0
  136. data/spec/fixtures/files/sample-color-newsletter.pdf +0 -0
  137. data/spec/fixtures/files/thumbnail.jpg +0 -0
  138. data/spec/helpers/hyrax/iiif_helper_spec.rb +0 -65
  139. data/spec/helpers/iiif_print_helper_spec.rb +0 -43
  140. data/spec/iiif_print/base_derivative_service_spec.rb +0 -11
  141. data/spec/iiif_print/blacklight_iiif_search/annotation_decorator_spec.rb +0 -51
  142. data/spec/iiif_print/catalog_search_builder_spec.rb +0 -60
  143. data/spec/iiif_print/configuration_spec.rb +0 -67
  144. data/spec/iiif_print/data/work_derivatives_spec.rb +0 -245
  145. data/spec/iiif_print/data/work_file_spec.rb +0 -99
  146. data/spec/iiif_print/data/work_files_spec.rb +0 -237
  147. data/spec/iiif_print/image_tool_spec.rb +0 -109
  148. data/spec/iiif_print/jobs/child_works_from_pdf_job_spec.rb +0 -30
  149. data/spec/iiif_print/jobs/create_relationships_job_spec.rb +0 -17
  150. data/spec/iiif_print/jp2_image_metadata_spec.rb +0 -37
  151. data/spec/iiif_print/lineage_service_spec.rb +0 -13
  152. data/spec/iiif_print/metadata_spec.rb +0 -115
  153. data/spec/iiif_print/split_pdfs/pages_into_images_service_spec.rb +0 -6
  154. data/spec/iiif_print/text_extraction/alto_reader_spec.rb +0 -49
  155. data/spec/iiif_print/text_extraction/hocr_reader_spec.rb +0 -45
  156. data/spec/iiif_print/text_extraction/page_ocr_spec.rb +0 -84
  157. data/spec/iiif_print/text_extraction/render_alto_spec.rb +0 -54
  158. data/spec/iiif_print/text_extraction/word_coords_builder_spec.rb +0 -44
  159. data/spec/iiif_print_spec.rb +0 -51
  160. data/spec/misc_shared.rb +0 -111
  161. data/spec/models/iiif_print/derivative_attachment_spec.rb +0 -37
  162. data/spec/models/iiif_print/ingest_file_relation_spec.rb +0 -56
  163. data/spec/models/solr_document_spec.rb +0 -14
  164. data/spec/presenters/iiif_print/iiif_manifest_presenter_behavior_spec.rb +0 -19
  165. data/spec/presenters/iiif_print/iiif_manifest_presenter_factory_behavior_spec.rb +0 -49
  166. data/spec/services/iiif_print/jp2_derivative_service_spec.rb +0 -59
  167. data/spec/services/iiif_print/pdf_derivative_service_spec.rb +0 -66
  168. data/spec/services/iiif_print/pluggable_derivative_service_spec.rb +0 -178
  169. data/spec/services/iiif_print/text_extraction_derivative_service_spec.rb +0 -82
  170. data/spec/services/iiif_print/text_formats_from_alto_service_spec.rb +0 -127
  171. data/spec/services/iiif_print/tiff_derivative_service_spec.rb +0 -65
  172. data/spec/spec_helper.rb +0 -181
  173. data/spec/support/controller_level_helpers.rb +0 -28
  174. data/spec/support/iiif_print_models.rb +0 -127
  175. data/spec/test_app_templates/blacklight.yml +0 -9
  176. data/spec/test_app_templates/fedora.yml +0 -15
  177. data/spec/test_app_templates/lib/generators/test_app_generator.rb +0 -40
  178. data/spec/test_app_templates/redis.yml +0 -9
  179. data/spec/test_app_templates/solr/conf/schema.xml +0 -362
  180. data/spec/test_app_templates/solr/conf/solrconfig.xml +0 -322
  181. data/spec/test_app_templates/solr.yml +0 -7
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iiif_print
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Upton
@@ -14,36 +14,42 @@ authors:
14
14
  autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
- date: 2023-03-07 00:00:00.000000000 Z
17
+ date: 2024-05-30 00:00:00.000000000 Z
18
18
  dependencies:
19
19
  - !ruby/object:Gem::Dependency
20
20
  name: blacklight_iiif_search
21
21
  requirement: !ruby/object:Gem::Requirement
22
22
  requirements:
23
- - - "~>"
23
+ - - ">="
24
24
  - !ruby/object:Gem::Version
25
25
  version: '1.0'
26
+ - - "<"
27
+ - !ruby/object:Gem::Version
28
+ version: '3.0'
26
29
  type: :runtime
27
30
  prerelease: false
28
31
  version_requirements: !ruby/object:Gem::Requirement
29
32
  requirements:
30
- - - "~>"
33
+ - - ">="
31
34
  - !ruby/object:Gem::Version
32
35
  version: '1.0'
36
+ - - "<"
37
+ - !ruby/object:Gem::Version
38
+ version: '3.0'
33
39
  - !ruby/object:Gem::Dependency
34
- name: dry-monads
40
+ name: derivative-rodeo
35
41
  requirement: !ruby/object:Gem::Requirement
36
42
  requirements:
37
43
  - - "~>"
38
44
  - !ruby/object:Gem::Version
39
- version: 1.4.0
45
+ version: '0.5'
40
46
  type: :runtime
41
47
  prerelease: false
42
48
  version_requirements: !ruby/object:Gem::Requirement
43
49
  requirements:
44
50
  - - "~>"
45
51
  - !ruby/object:Gem::Version
46
- version: 1.4.0
52
+ version: '0.5'
47
53
  - !ruby/object:Gem::Dependency
48
54
  name: hyrax
49
55
  requirement: !ruby/object:Gem::Requirement
@@ -53,7 +59,7 @@ dependencies:
53
59
  version: '2.5'
54
60
  - - "<"
55
61
  - !ruby/object:Gem::Version
56
- version: '4.0'
62
+ version: '6'
57
63
  type: :runtime
58
64
  prerelease: false
59
65
  version_requirements: !ruby/object:Gem::Requirement
@@ -63,7 +69,7 @@ dependencies:
63
69
  version: '2.5'
64
70
  - - "<"
65
71
  - !ruby/object:Gem::Version
66
- version: '4.0'
72
+ version: '6'
67
73
  - !ruby/object:Gem::Dependency
68
74
  name: nokogiri
69
75
  requirement: !ruby/object:Gem::Requirement
@@ -78,20 +84,6 @@ dependencies:
78
84
  - - ">="
79
85
  - !ruby/object:Gem::Version
80
86
  version: 1.13.2
81
- - !ruby/object:Gem::Dependency
82
- name: rails
83
- requirement: !ruby/object:Gem::Requirement
84
- requirements:
85
- - - "~>"
86
- - !ruby/object:Gem::Version
87
- version: '5.0'
88
- type: :runtime
89
- prerelease: false
90
- version_requirements: !ruby/object:Gem::Requirement
91
- requirements:
92
- - - "~>"
93
- - !ruby/object:Gem::Version
94
- version: '5.0'
95
87
  - !ruby/object:Gem::Dependency
96
88
  name: rdf-vocab
97
89
  requirement: !ruby/object:Gem::Requirement
@@ -216,20 +208,34 @@ dependencies:
216
208
  - - "~>"
217
209
  - !ruby/object:Gem::Version
218
210
  version: '1'
211
+ - !ruby/object:Gem::Dependency
212
+ name: json-canonicalization
213
+ requirement: !ruby/object:Gem::Requirement
214
+ requirements:
215
+ - - '='
216
+ - !ruby/object:Gem::Version
217
+ version: 0.3.1
218
+ type: :development
219
+ prerelease: false
220
+ version_requirements: !ruby/object:Gem::Requirement
221
+ requirements:
222
+ - - '='
223
+ - !ruby/object:Gem::Version
224
+ version: 0.3.1
219
225
  - !ruby/object:Gem::Dependency
220
226
  name: rspec-rails
221
227
  requirement: !ruby/object:Gem::Requirement
222
228
  requirements:
223
- - - "~>"
229
+ - - ">="
224
230
  - !ruby/object:Gem::Version
225
- version: '3.1'
231
+ version: '0'
226
232
  type: :development
227
233
  prerelease: false
228
234
  version_requirements: !ruby/object:Gem::Requirement
229
235
  requirements:
230
- - - "~>"
236
+ - - ">="
231
237
  - !ruby/object:Gem::Version
232
- version: '3.1'
238
+ version: '0'
233
239
  - !ruby/object:Gem::Dependency
234
240
  name: rspec-activemodel-mocks
235
241
  requirement: !ruby/object:Gem::Requirement
@@ -278,6 +284,34 @@ dependencies:
278
284
  - - "<"
279
285
  - !ruby/object:Gem::Version
280
286
  version: '3.0'
287
+ - !ruby/object:Gem::Dependency
288
+ name: solargraph
289
+ requirement: !ruby/object:Gem::Requirement
290
+ requirements:
291
+ - - ">="
292
+ - !ruby/object:Gem::Version
293
+ version: '0'
294
+ type: :development
295
+ prerelease: false
296
+ version_requirements: !ruby/object:Gem::Requirement
297
+ requirements:
298
+ - - ">="
299
+ - !ruby/object:Gem::Version
300
+ version: '0'
301
+ - !ruby/object:Gem::Dependency
302
+ name: yard
303
+ requirement: !ruby/object:Gem::Requirement
304
+ requirements:
305
+ - - ">="
306
+ - !ruby/object:Gem::Version
307
+ version: '0'
308
+ type: :development
309
+ prerelease: false
310
+ version_requirements: !ruby/object:Gem::Requirement
311
+ requirements:
312
+ - - ">="
313
+ - !ruby/object:Gem::Version
314
+ version: '0'
281
315
  description: Gem/Engine for IIIF Print works in Hyrax-based Samvera Application.
282
316
  email:
283
317
  - sean.upton@utah.edu
@@ -294,20 +328,25 @@ files:
294
328
  - ".coveralls.yml"
295
329
  - ".env"
296
330
  - ".fcrepo_wrapper"
331
+ - ".github/ISSUE_TEMPLATE.md"
332
+ - ".github/PULL_REQUEST_TEMPLATE.md"
297
333
  - ".github/release.yml"
298
334
  - ".github/workflows/branches.yml"
299
335
  - ".github/workflows/build-lint-test-action.yaml"
300
336
  - ".github/workflows/release_labels.yml"
301
337
  - ".gitignore"
302
338
  - ".rubocop.yml"
339
+ - ".solargraph.yml"
303
340
  - ".solr_wrapper"
304
341
  - ".travis.yml"
305
342
  - CONTRIBUTING.md
306
343
  - Dockerfile
307
344
  - Gemfile
345
+ - Gemfile.lock
308
346
  - LICENSE
309
347
  - README.md
310
348
  - Rakefile
349
+ - app/actors/iiif_print/actors/cleanup_file_sets_actor_decorator.rb
311
350
  - app/actors/iiif_print/actors/file_set_actor_decorator.rb
312
351
  - app/assets/config/iiif_print_manifest.js
313
352
  - app/assets/images/iiif_print/.keep
@@ -319,34 +358,50 @@ files:
319
358
  - app/assets/stylesheets/iiif_print/_issues_calendar.scss
320
359
  - app/assets/stylesheets/iiif_print/_newspapers_search.scss
321
360
  - app/assets/stylesheets/iiif_print/_search_results.scss
322
- - app/helpers/hyrax/iiif_helper.rb
361
+ - app/controllers/iiif_print/split_pdfs_controller.rb
323
362
  - app/helpers/iiif_print/application_helper.rb
363
+ - app/helpers/iiif_print/iiif_helper_decorator.rb
364
+ - app/helpers/iiif_print/iiif_print_helper_behavior.rb
324
365
  - app/helpers/iiif_print_helper.rb
325
- - app/indexers/concerns/iiif_print/child_indexer.rb
366
+ - app/indexers/concerns/iiif_print/child_work_indexer.rb
326
367
  - app/indexers/concerns/iiif_print/file_set_indexer.rb
368
+ - app/jobs/iiif_print/jobs/application_job.rb
369
+ - app/jobs/iiif_print/jobs/child_works_from_pdf_job.rb
370
+ - app/jobs/iiif_print/jobs/create_relationships_job.rb
371
+ - app/jobs/iiif_print/jobs/request_split_pdf_job.rb
372
+ - app/listeners/iiif_print/listener.rb
327
373
  - app/mailers/iiif_print/application_mailer.rb
328
374
  - app/models/concerns/iiif_print/set_child_flag.rb
329
375
  - app/models/concerns/iiif_print/solr/document.rb
330
376
  - app/models/iiif_print/application_record.rb
331
377
  - app/models/iiif_print/derivative_attachment.rb
378
+ - app/models/iiif_print/iiif_search_decorator.rb
332
379
  - app/models/iiif_print/iiif_search_response_decorator.rb
333
380
  - app/models/iiif_print/ingest_file_relation.rb
334
381
  - app/models/iiif_print/pending_relationship.rb
382
+ - app/presenters/iiif_print/file_set_presenter_decorator.rb
335
383
  - app/presenters/iiif_print/iiif_manifest_presenter_behavior.rb
336
384
  - app/presenters/iiif_print/iiif_manifest_presenter_factory_behavior.rb
337
385
  - app/presenters/iiif_print/work_show_presenter_decorator.rb
338
386
  - app/renderers/hyrax/renderers/faceted_attribute_renderer_decorator.rb
387
+ - app/search_builders/concerns/iiif_print/allinson_flex_fields.rb
339
388
  - app/search_builders/concerns/iiif_print/exclude_models.rb
340
389
  - app/search_builders/concerns/iiif_print/highlight_search_params.rb
390
+ - app/services/iiif_print/derivative_rodeo_service.rb
341
391
  - app/services/iiif_print/manifest_builder_service_behavior.rb
342
392
  - app/services/iiif_print/pluggable_derivative_service.rb
393
+ - app/services/iiif_print/simple_schema_loader_decorator.rb
394
+ - app/transactions/hyrax/transactions/iiif_print_container_decorator.rb
395
+ - app/transactions/hyrax/transactions/steps/conditionally_destroy_children_from_split.rb
396
+ - app/transactions/hyrax/transactions/steps/delete_all_file_sets_decorator.rb
397
+ - app/views/catalog/_index_header_list_default.html.erb
343
398
  - app/views/catalog/_snippets_more.html.erb
344
399
  - app/views/hyrax/base/_representative_media.html.erb
345
400
  - app/views/hyrax/base/iiif_viewers/_universal_viewer.html.erb
346
- - app/views/hyrax/file_sets/_actions.html.erb
347
- - bin/rails
401
+ - app/views/hyrax/file_sets/_show_actions.html.erb
348
402
  - config/fcrepo_wrapper_test.yml
349
403
  - config/initializers/assets.rb
404
+ - config/initializers/simple_schema_loader.rb
350
405
  - config/locales/iiif_print.de.yml
351
406
  - config/locales/iiif_print.en.yml
352
407
  - config/locales/iiif_print.es.yml
@@ -354,6 +409,8 @@ files:
354
409
  - config/locales/iiif_print.it.yml
355
410
  - config/locales/iiif_print.pt-BR.yml
356
411
  - config/locales/iiif_print.zh.yml
412
+ - config/metadata/child_works_from_pdf_splitting.yaml
413
+ - config/routes.rb
357
414
  - config/solr_wrapper_test.yml
358
415
  - config/test-fixture/solr-config/_rest_managed.json
359
416
  - config/test-fixture/solr-config/admin-extra.html
@@ -376,12 +433,14 @@ files:
376
433
  - db/migrate/20181214181358_create_iiif_print_derivative_attachments.rb
377
434
  - db/migrate/20190107165909_create_iiif_print_ingest_file_relations.rb
378
435
  - db/migrate/20230109000000_create_iiif_print_pending_relationships.rb
436
+ - db/migrate/20231110163052_add_model_details_to_iiif_print_pending_relationships.rb
379
437
  - docker-compose.yml
380
438
  - iiif_print.gemspec
381
439
  - lib/generators/iiif_print/assets_generator.rb
382
440
  - lib/generators/iiif_print/catalog_controller_generator.rb
383
441
  - lib/generators/iiif_print/install_generator.rb
384
442
  - lib/generators/iiif_print/templates/config/initializers/iiif_print.rb
443
+ - lib/generators/iiif_print/templates/helpers/iiif_print_helper.rb
385
444
  - lib/generators/iiif_print/templates/iiif_print.scss
386
445
  - lib/iiif_print.rb
387
446
  - lib/iiif_print/base_derivative_service.rb
@@ -396,17 +455,23 @@ files:
396
455
  - lib/iiif_print/data/work_files.rb
397
456
  - lib/iiif_print/engine.rb
398
457
  - lib/iiif_print/errors.rb
458
+ - lib/iiif_print/homepage_search_builder.rb
399
459
  - lib/iiif_print/image_tool.rb
400
- - lib/iiif_print/jobs/application_job.rb
401
- - lib/iiif_print/jobs/child_works_from_pdf_job.rb
402
- - lib/iiif_print/jobs/create_relationships_job.rb
403
460
  - lib/iiif_print/jp2_derivative_service.rb
404
461
  - lib/iiif_print/jp2_image_metadata.rb
405
462
  - lib/iiif_print/lineage_service.rb
406
463
  - lib/iiif_print/metadata.rb
407
464
  - lib/iiif_print/pdf_derivative_service.rb
465
+ - lib/iiif_print/persistence_layer.rb
466
+ - lib/iiif_print/persistence_layer/active_fedora_adapter.rb
467
+ - lib/iiif_print/persistence_layer/valkyrie_adapter.rb
468
+ - lib/iiif_print/split_pdfs/base_splitter.rb
408
469
  - lib/iiif_print/split_pdfs/child_work_creation_from_pdf_service.rb
409
- - lib/iiif_print/split_pdfs/pages_into_images_service.rb
470
+ - lib/iiif_print/split_pdfs/derivative_rodeo_splitter.rb
471
+ - lib/iiif_print/split_pdfs/destroy_pdf_child_works_service.rb
472
+ - lib/iiif_print/split_pdfs/pages_to_jpgs_splitter.rb
473
+ - lib/iiif_print/split_pdfs/pages_to_pngs_splitter.rb
474
+ - lib/iiif_print/split_pdfs/pages_to_tiffs_splitter.rb
410
475
  - lib/iiif_print/split_pdfs/pdf_image_extraction_service.rb
411
476
  - lib/iiif_print/text_extraction.rb
412
477
  - lib/iiif_print/text_extraction/alto_reader.rb
@@ -419,88 +484,14 @@ files:
419
484
  - lib/iiif_print/tiff_derivative_service.rb
420
485
  - lib/iiif_print/version.rb
421
486
  - lib/iiif_print/works_controller_behavior.rb
487
+ - lib/samvera/derivatives.rb
488
+ - lib/samvera/derivatives/configuration.rb
489
+ - lib/samvera/derivatives/hyrax.rb
422
490
  - lib/tasks/set_child_works.rake
423
- - spec/.keep.txt
424
- - spec/factories/ability.rb
425
- - spec/factories/newspaper_issue.rb
426
- - spec/factories/newspaper_page.rb
427
- - spec/factories/newspaper_page_solr_document.rb
428
- - spec/factories/newspaper_title.rb
429
- - spec/factories/uploaded_pdf_file.rb
430
- - spec/factories/uploaded_txt_file.rb
431
- - spec/factories/user.rb
432
- - spec/fixtures/files/4.1.07.jp2
433
- - spec/fixtures/files/4.1.07.tiff
434
- - spec/fixtures/files/README.md
435
- - spec/fixtures/files/alto-2-0.xsd
436
- - spec/fixtures/files/broken-truncated.pdf
437
- - spec/fixtures/files/credits.md
438
- - spec/fixtures/files/lowres-gray-via-ndnp-sample.tiff
439
- - spec/fixtures/files/minimal-1-page.pdf
440
- - spec/fixtures/files/minimal-2-page.pdf
441
- - spec/fixtures/files/minimal-alto.xml
442
- - spec/fixtures/files/ndnp-alto-sample.xml
443
- - spec/fixtures/files/ndnp-sample1-json.json
444
- - spec/fixtures/files/ndnp-sample1-txt.txt
445
- - spec/fixtures/files/ndnp-sample1.pdf
446
- - spec/fixtures/files/ocr_alto.xml
447
- - spec/fixtures/files/ocr_alto_scaled_4pts_per_px.xml
448
- - spec/fixtures/files/ocr_color.tiff
449
- - spec/fixtures/files/ocr_gray.jp2
450
- - spec/fixtures/files/ocr_gray.tiff
451
- - spec/fixtures/files/ocr_mono.tiff
452
- - spec/fixtures/files/ocr_mono_text_hocr.html
453
- - spec/fixtures/files/page1.tiff
454
- - spec/fixtures/files/sample-4page-issue.pdf
455
- - spec/fixtures/files/sample-color-newsletter.pdf
456
- - spec/fixtures/files/thumbnail.jpg
457
- - spec/helpers/hyrax/iiif_helper_spec.rb
458
- - spec/helpers/iiif_print_helper_spec.rb
459
- - spec/iiif_print/base_derivative_service_spec.rb
460
- - spec/iiif_print/blacklight_iiif_search/annotation_decorator_spec.rb
461
- - spec/iiif_print/catalog_search_builder_spec.rb
462
- - spec/iiif_print/configuration_spec.rb
463
- - spec/iiif_print/data/work_derivatives_spec.rb
464
- - spec/iiif_print/data/work_file_spec.rb
465
- - spec/iiif_print/data/work_files_spec.rb
466
- - spec/iiif_print/image_tool_spec.rb
467
- - spec/iiif_print/jobs/child_works_from_pdf_job_spec.rb
468
- - spec/iiif_print/jobs/create_relationships_job_spec.rb
469
- - spec/iiif_print/jp2_image_metadata_spec.rb
470
- - spec/iiif_print/lineage_service_spec.rb
471
- - spec/iiif_print/metadata_spec.rb
472
- - spec/iiif_print/split_pdfs/pages_into_images_service_spec.rb
473
- - spec/iiif_print/text_extraction/alto_reader_spec.rb
474
- - spec/iiif_print/text_extraction/hocr_reader_spec.rb
475
- - spec/iiif_print/text_extraction/page_ocr_spec.rb
476
- - spec/iiif_print/text_extraction/render_alto_spec.rb
477
- - spec/iiif_print/text_extraction/word_coords_builder_spec.rb
478
- - spec/iiif_print_spec.rb
479
- - spec/misc_shared.rb
480
- - spec/models/iiif_print/derivative_attachment_spec.rb
481
- - spec/models/iiif_print/ingest_file_relation_spec.rb
482
- - spec/models/solr_document_spec.rb
483
- - spec/presenters/iiif_print/iiif_manifest_presenter_behavior_spec.rb
484
- - spec/presenters/iiif_print/iiif_manifest_presenter_factory_behavior_spec.rb
485
- - spec/services/iiif_print/jp2_derivative_service_spec.rb
486
- - spec/services/iiif_print/pdf_derivative_service_spec.rb
487
- - spec/services/iiif_print/pluggable_derivative_service_spec.rb
488
- - spec/services/iiif_print/text_extraction_derivative_service_spec.rb
489
- - spec/services/iiif_print/text_formats_from_alto_service_spec.rb
490
- - spec/services/iiif_print/tiff_derivative_service_spec.rb
491
- - spec/spec_helper.rb
492
- - spec/support/controller_level_helpers.rb
493
- - spec/support/iiif_print_models.rb
494
- - spec/test_app_templates/blacklight.yml
495
- - spec/test_app_templates/fedora.yml
496
- - spec/test_app_templates/lib/generators/test_app_generator.rb
497
- - spec/test_app_templates/redis.yml
498
- - spec/test_app_templates/solr.yml
499
- - spec/test_app_templates/solr/conf/schema.xml
500
- - spec/test_app_templates/solr/conf/solrconfig.xml
491
+ - tasks/copy_authorities_to_test_app.rake
501
492
  - tasks/iiif_print_dev.rake
502
493
  - tmp/.keep
503
- homepage: https://github.com/samvera-labs/iiif_print
494
+ homepage: https://github.com/scientist-softserv/iiif_print/
504
495
  licenses:
505
496
  - Apache-2.0
506
497
  metadata: {}
@@ -519,87 +510,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
519
510
  - !ruby/object:Gem::Version
520
511
  version: '0'
521
512
  requirements: []
522
- rubygems_version: 3.1.6
513
+ rubygems_version: 3.2.3
523
514
  signing_key:
524
515
  specification_version: 4
525
- summary: iiif_print is a Rails Engine gem providing model and administrative functions
526
- to Hyrax-based Samvera applications, for management of (primarily scanned) content.
527
- test_files:
528
- - spec/.keep.txt
529
- - spec/factories/ability.rb
530
- - spec/factories/newspaper_issue.rb
531
- - spec/factories/newspaper_page.rb
532
- - spec/factories/newspaper_page_solr_document.rb
533
- - spec/factories/newspaper_title.rb
534
- - spec/factories/uploaded_pdf_file.rb
535
- - spec/factories/uploaded_txt_file.rb
536
- - spec/factories/user.rb
537
- - spec/fixtures/files/4.1.07.jp2
538
- - spec/fixtures/files/4.1.07.tiff
539
- - spec/fixtures/files/README.md
540
- - spec/fixtures/files/alto-2-0.xsd
541
- - spec/fixtures/files/broken-truncated.pdf
542
- - spec/fixtures/files/credits.md
543
- - spec/fixtures/files/lowres-gray-via-ndnp-sample.tiff
544
- - spec/fixtures/files/minimal-1-page.pdf
545
- - spec/fixtures/files/minimal-2-page.pdf
546
- - spec/fixtures/files/minimal-alto.xml
547
- - spec/fixtures/files/ndnp-alto-sample.xml
548
- - spec/fixtures/files/ndnp-sample1-json.json
549
- - spec/fixtures/files/ndnp-sample1-txt.txt
550
- - spec/fixtures/files/ndnp-sample1.pdf
551
- - spec/fixtures/files/ocr_alto.xml
552
- - spec/fixtures/files/ocr_alto_scaled_4pts_per_px.xml
553
- - spec/fixtures/files/ocr_color.tiff
554
- - spec/fixtures/files/ocr_gray.jp2
555
- - spec/fixtures/files/ocr_gray.tiff
556
- - spec/fixtures/files/ocr_mono.tiff
557
- - spec/fixtures/files/ocr_mono_text_hocr.html
558
- - spec/fixtures/files/page1.tiff
559
- - spec/fixtures/files/sample-4page-issue.pdf
560
- - spec/fixtures/files/sample-color-newsletter.pdf
561
- - spec/fixtures/files/thumbnail.jpg
562
- - spec/helpers/hyrax/iiif_helper_spec.rb
563
- - spec/helpers/iiif_print_helper_spec.rb
564
- - spec/iiif_print/base_derivative_service_spec.rb
565
- - spec/iiif_print/blacklight_iiif_search/annotation_decorator_spec.rb
566
- - spec/iiif_print/catalog_search_builder_spec.rb
567
- - spec/iiif_print/configuration_spec.rb
568
- - spec/iiif_print/data/work_derivatives_spec.rb
569
- - spec/iiif_print/data/work_file_spec.rb
570
- - spec/iiif_print/data/work_files_spec.rb
571
- - spec/iiif_print/image_tool_spec.rb
572
- - spec/iiif_print/jobs/child_works_from_pdf_job_spec.rb
573
- - spec/iiif_print/jobs/create_relationships_job_spec.rb
574
- - spec/iiif_print/jp2_image_metadata_spec.rb
575
- - spec/iiif_print/lineage_service_spec.rb
576
- - spec/iiif_print/metadata_spec.rb
577
- - spec/iiif_print/split_pdfs/pages_into_images_service_spec.rb
578
- - spec/iiif_print/text_extraction/alto_reader_spec.rb
579
- - spec/iiif_print/text_extraction/hocr_reader_spec.rb
580
- - spec/iiif_print/text_extraction/page_ocr_spec.rb
581
- - spec/iiif_print/text_extraction/render_alto_spec.rb
582
- - spec/iiif_print/text_extraction/word_coords_builder_spec.rb
583
- - spec/iiif_print_spec.rb
584
- - spec/misc_shared.rb
585
- - spec/models/iiif_print/derivative_attachment_spec.rb
586
- - spec/models/iiif_print/ingest_file_relation_spec.rb
587
- - spec/models/solr_document_spec.rb
588
- - spec/presenters/iiif_print/iiif_manifest_presenter_behavior_spec.rb
589
- - spec/presenters/iiif_print/iiif_manifest_presenter_factory_behavior_spec.rb
590
- - spec/services/iiif_print/jp2_derivative_service_spec.rb
591
- - spec/services/iiif_print/pdf_derivative_service_spec.rb
592
- - spec/services/iiif_print/pluggable_derivative_service_spec.rb
593
- - spec/services/iiif_print/text_extraction_derivative_service_spec.rb
594
- - spec/services/iiif_print/text_formats_from_alto_service_spec.rb
595
- - spec/services/iiif_print/tiff_derivative_service_spec.rb
596
- - spec/spec_helper.rb
597
- - spec/support/controller_level_helpers.rb
598
- - spec/support/iiif_print_models.rb
599
- - spec/test_app_templates/blacklight.yml
600
- - spec/test_app_templates/fedora.yml
601
- - spec/test_app_templates/lib/generators/test_app_generator.rb
602
- - spec/test_app_templates/redis.yml
603
- - spec/test_app_templates/solr.yml
604
- - spec/test_app_templates/solr/conf/schema.xml
605
- - spec/test_app_templates/solr/conf/solrconfig.xml
516
+ summary: IiifPrint is a gem (Rails "engine") for Hyrax-based digital repository applications
517
+ to support displaying parent/child works in the same viewer (Universal Viewer) and
518
+ the ability to search OCR from the parent work to the child work(s). IiifPring was
519
+ originally based off of the samvera-labs Newspaper gem.
520
+ test_files: []
@@ -1,22 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Hyrax
4
- module IiifHelper
5
- def iiif_viewer_display(work_presenter, locals = {})
6
- render iiif_viewer_display_partial(work_presenter),
7
- locals.merge(presenter: work_presenter)
8
- end
9
-
10
- def iiif_viewer_display_partial(work_presenter)
11
- 'hyrax/base/iiif_viewers/' + work_presenter.iiif_viewer.to_s
12
- end
13
-
14
- def universal_viewer_base_url
15
- "#{request&.base_url}/uv/uv.html"
16
- end
17
-
18
- def universal_viewer_config_url
19
- "#{request&.base_url}/uv/uv-config.json"
20
- end
21
- end
22
- end
@@ -1,34 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module IiifPrint
4
- module ChildIndexer
5
- ##
6
- # @api private
7
- #
8
- # The goal of this method is to encapsulate the logic for what all we need for child
9
- # relationships.
10
- def self.decorate_work_types!
11
- # TODO: This method is in the wrong location; says indexing but there's also the SetChildFlag
12
- # consideration. Consider refactoring this stuff into a single nested module.
13
- #
14
-
15
- Hyrax.config.curation_concerns.each do |work_type|
16
- work_type.send(:include, IiifPrint::SetChildFlag) unless work_type.included_modules.include?(IiifPrint::SetChildFlag)
17
- indexer = work_type.indexer
18
- unless indexer.respond_to?(:iiif_print_lineage_service)
19
- indexer.prepend(self)
20
- indexer.class_attribute(:iiif_print_lineage_service, default: IiifPrint::LineageService)
21
- end
22
- work_type::GeneratedResourceSchema.send(:include, IiifPrint::SetChildFlag)
23
- end
24
- end
25
-
26
- def generate_solr_document
27
- super.tap do |solr_doc|
28
- solr_doc['is_child_bsi'] = object.is_child
29
- solr_doc['is_page_of_ssim'] = iiif_print_lineage_service.ancestor_ids_for(object)
30
- solr_doc['file_set_ids_ssim'] = iiif_print_lineage_service.descendent_file_set_ids_for(object)
31
- end
32
- end
33
- end
34
- end
@@ -1,45 +0,0 @@
1
- <div class="btn-group">
2
-
3
- <button class="btn btn-default dropdown-toggle" data-toggle="dropdown" type="button" id="dropdownMenu_<%= file_set.id %>" aria-haspopup="true">
4
- <span class="sr-only">Press to </span>
5
- Select an action
6
- <span class="caret" aria-hidden="true"></span>
7
- </button>
8
-
9
- <ul role="menu" class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownMenu_<%= file_set.id %>">
10
- <% if can?(:edit, file_set.id) %>
11
- <li role="menuitem" tabindex="-1">
12
- <%= link_to 'Edit', edit_polymorphic_path([main_app, file_set]),
13
- { title: "Edit #{file_set}" } %>
14
- </li>
15
-
16
- <li role="menuitem" tabindex="-1">
17
- <%= link_to 'Versions', edit_polymorphic_path([main_app, file_set], anchor: 'versioning_display'),
18
- { title: "Display previous versions" } %>
19
- </li>
20
- <% end %>
21
-
22
- <% if can?(:destroy, file_set.id) %>
23
- <li role="menuitem" tabindex="-1">
24
- <%= link_to 'Delete', polymorphic_path([main_app, file_set]),
25
- method: :delete, title: "Delete #{file_set}",
26
- data: {confirm: "Deleting #{file_set} from #{application_name} is permanent. Click OK to delete this from #{application_name}, or Cancel to cancel this operation"} %>
27
- </li>
28
- <% end %>
29
-
30
- <% if can?(:download, file_set.id) %>
31
- <li role="menuitem" tabindex="-1">
32
- <%= link_to 'Download', hyrax.download_path(file_set),
33
- title: "Download #{file_set.to_s.inspect}", target: "_blank" %>
34
- </li>
35
- <% IiifPrint::Data::WorkDerivatives.new(file_set.id).keys.each do |name| %>
36
- <li role="menuitem" tabindex="-1">
37
- <a href="<%= "/downloads/#{file_set.id}?locale=en&file=#{name}" %>" download>
38
- Download <em>(as <%= name %>)</em>
39
- </a>
40
- </li>
41
- <% end %>
42
- <% end %>
43
-
44
- </ul>
45
- </div>
data/bin/rails DELETED
@@ -1,13 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # This command will automatically be run when you run "rails" with Rails gems
3
- # installed from the root of your application.
4
-
5
- ENGINE_ROOT = File.expand_path('../..', __FILE__)
6
- ENGINE_PATH = File.expand_path('../../lib/iiif_print/engine', __FILE__)
7
-
8
- # Set up gems listed in the Gemfile.
9
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
10
- require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
11
-
12
- require 'rails/all'
13
- require 'rails/engine/commands'