libis-format 1.3.4 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (78) hide show
  1. checksums.yaml +4 -4
  2. data/.coveralls.yml +2 -0
  3. data/.gitignore +20 -0
  4. data/.travis.yml +70 -0
  5. data/Gemfile +0 -12
  6. data/README.md +2 -2
  7. data/Rakefile +8 -0
  8. data/base/Dockerfile +35 -0
  9. data/base/Dockerfile.alpine +20 -0
  10. data/base/Dockerfile.rvm +56 -0
  11. data/base/rework_path +20 -0
  12. data/bin/{pdf_tool → pdf_copy} +2 -3
  13. data/data/PDFA_def.ps +3 -3
  14. data/data/eciRGB_v2.icc +0 -0
  15. data/data/types.yml +4 -17
  16. data/docker_cfg.yml +1 -0
  17. data/lib/libis/format/cli/convert.rb +4 -4
  18. data/lib/libis/format/cli/prompt_helper.rb +24 -32
  19. data/lib/libis/format/command_line.rb +3 -2
  20. data/lib/libis/format/config.rb +23 -19
  21. data/lib/libis/format/converter/audio_converter.rb +31 -56
  22. data/lib/libis/format/converter/base.rb +36 -16
  23. data/lib/libis/format/converter/chain.rb +32 -52
  24. data/lib/libis/format/converter/fop_pdf_converter.rb +8 -4
  25. data/lib/libis/format/converter/image_assembler.rb +82 -0
  26. data/lib/libis/format/converter/image_converter.rb +45 -250
  27. data/lib/libis/format/converter/image_splitter.rb +80 -0
  28. data/lib/libis/format/converter/image_watermarker.rb +261 -0
  29. data/lib/libis/format/converter/jp2_converter.rb +38 -36
  30. data/lib/libis/format/converter/office_converter.rb +28 -22
  31. data/lib/libis/format/converter/pdf_assembler.rb +66 -0
  32. data/lib/libis/format/converter/pdf_converter.rb +52 -200
  33. data/lib/libis/format/converter/pdf_optimizer.rb +70 -0
  34. data/lib/libis/format/converter/pdf_splitter.rb +65 -0
  35. data/lib/libis/format/converter/pdf_watermarker.rb +110 -0
  36. data/lib/libis/format/converter/repository.rb +13 -7
  37. data/lib/libis/format/converter/spreadsheet_converter.rb +16 -10
  38. data/lib/libis/format/converter/video_converter.rb +58 -47
  39. data/lib/libis/format/converter/xslt_converter.rb +11 -13
  40. data/lib/libis/format/converter.rb +1 -1
  41. data/lib/libis/format/identifier.rb +46 -44
  42. data/lib/libis/format/info.rb +27 -0
  43. data/lib/libis/format/library.rb +147 -0
  44. data/lib/libis/format/tool/droid.rb +30 -29
  45. data/lib/libis/format/tool/extension_identification.rb +26 -24
  46. data/lib/libis/format/tool/{ff_mpeg.rb → ffmpeg.rb} +10 -17
  47. data/lib/libis/format/tool/fido.rb +27 -22
  48. data/lib/libis/format/tool/file_tool.rb +24 -11
  49. data/lib/libis/format/tool/fop_pdf.rb +14 -25
  50. data/lib/libis/format/tool/identification_tool.rb +40 -38
  51. data/lib/libis/format/tool/office_to_pdf.rb +18 -30
  52. data/lib/libis/format/tool/pdf_copy.rb +47 -0
  53. data/lib/libis/format/tool/pdf_merge.rb +19 -25
  54. data/lib/libis/format/tool/pdf_optimizer.rb +19 -22
  55. data/lib/libis/format/tool/pdf_split.rb +33 -6
  56. data/lib/libis/format/tool/pdf_to_pdfa.rb +31 -45
  57. data/lib/libis/format/tool/pdfa_validator.rb +30 -24
  58. data/lib/libis/format/tool/spreadsheet_to_ods.rb +18 -29
  59. data/lib/libis/format/tool.rb +3 -4
  60. data/lib/libis/format/version.rb +1 -3
  61. data/lib/libis/format/yaml_loader.rb +71 -0
  62. data/lib/libis/format.rb +7 -5
  63. data/lib/libis-format.rb +0 -2
  64. data/libis-format.gemspec +18 -24
  65. data/tools/PdfTool.jar +0 -0
  66. data/tools/pdfbox/pdfbox-app-2.0.13.jar +0 -0
  67. data/tools/pdfbox/{preflight-app-3.0.3.jar → preflight-app-2.0.13.jar} +0 -0
  68. metadata +86 -128
  69. data/data/AdobeRGB1998.icc +0 -0
  70. data/lib/libis/format/converter/email_converter.rb +0 -35
  71. data/lib/libis/format/tool/msg_to_pdf.rb +0 -270
  72. data/lib/libis/format/tool/pdf_tool.rb +0 -52
  73. data/lib/libis/format/type_database.rb +0 -156
  74. data/lib/libis/format/type_database_impl.rb +0 -153
  75. data/tools/pdf2pdfa +0 -395
  76. data/tools/pdfbox/pdfbox-app-3.0.3.jar +0 -0
  77. /data/bin/{droid_tool → droid} +0 -0
  78. /data/bin/{fido_tool → fido} +0 -0
metadata CHANGED
@@ -1,101 +1,87 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: libis-format
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.4
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kris Dekeyser
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-10-11 00:00:00.000000000 Z
11
+ date: 2020-11-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: chromaprint
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: 0.0.2
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: 0.0.2
27
- - !ruby/object:Gem::Dependency
28
- name: deep_dive
14
+ name: rake
29
15
  requirement: !ruby/object:Gem::Requirement
30
16
  requirements:
31
17
  - - "~>"
32
18
  - !ruby/object:Gem::Version
33
- version: '0.3'
34
- type: :runtime
19
+ version: '10.3'
20
+ type: :development
35
21
  prerelease: false
36
22
  version_requirements: !ruby/object:Gem::Requirement
37
23
  requirements:
38
24
  - - "~>"
39
25
  - !ruby/object:Gem::Version
40
- version: '0.3'
26
+ version: '10.3'
41
27
  - !ruby/object:Gem::Dependency
42
- name: libis-mapi
28
+ name: rspec
43
29
  requirement: !ruby/object:Gem::Requirement
44
30
  requirements:
45
31
  - - "~>"
46
32
  - !ruby/object:Gem::Version
47
- version: '0.3'
48
- type: :runtime
33
+ version: '3.1'
34
+ type: :development
49
35
  prerelease: false
50
36
  version_requirements: !ruby/object:Gem::Requirement
51
37
  requirements:
52
38
  - - "~>"
53
39
  - !ruby/object:Gem::Version
54
- version: '0.3'
40
+ version: '3.1'
55
41
  - !ruby/object:Gem::Dependency
56
- name: libis-tools
42
+ name: awesome_print
57
43
  requirement: !ruby/object:Gem::Requirement
58
44
  requirements:
59
- - - "~>"
45
+ - - ">="
60
46
  - !ruby/object:Gem::Version
61
- version: '1.1'
62
- type: :runtime
47
+ version: '0'
48
+ type: :development
63
49
  prerelease: false
64
50
  version_requirements: !ruby/object:Gem::Requirement
65
51
  requirements:
66
- - - "~>"
52
+ - - ">="
67
53
  - !ruby/object:Gem::Version
68
- version: '1.1'
54
+ version: '0'
69
55
  - !ruby/object:Gem::Dependency
70
- name: mini_magick
56
+ name: equivalent-xml
71
57
  requirement: !ruby/object:Gem::Requirement
72
58
  requirements:
73
59
  - - "~>"
74
60
  - !ruby/object:Gem::Version
75
- version: 5.0.1
76
- type: :runtime
61
+ version: '0.5'
62
+ type: :development
77
63
  prerelease: false
78
64
  version_requirements: !ruby/object:Gem::Requirement
79
65
  requirements:
80
66
  - - "~>"
81
67
  - !ruby/object:Gem::Version
82
- version: 5.0.1
68
+ version: '0.5'
83
69
  - !ruby/object:Gem::Dependency
84
- name: naturally
70
+ name: nokogiri
85
71
  requirement: !ruby/object:Gem::Requirement
86
72
  requirements:
87
- - - "~>"
73
+ - - ">="
88
74
  - !ruby/object:Gem::Version
89
- version: '2.2'
90
- type: :runtime
75
+ version: '0'
76
+ type: :development
91
77
  prerelease: false
92
78
  version_requirements: !ruby/object:Gem::Requirement
93
79
  requirements:
94
- - - "~>"
80
+ - - ">="
95
81
  - !ruby/object:Gem::Version
96
- version: '2.2'
82
+ version: '0'
97
83
  - !ruby/object:Gem::Dependency
98
- name: new_rfc_2047
84
+ name: libis-tools
99
85
  requirement: !ruby/object:Gem::Requirement
100
86
  requirements:
101
87
  - - "~>"
@@ -112,142 +98,109 @@ dependencies:
112
98
  name: os
113
99
  requirement: !ruby/object:Gem::Requirement
114
100
  requirements:
115
- - - "~>"
101
+ - - '='
116
102
  - !ruby/object:Gem::Version
117
- version: '1.1'
103
+ version: 0.9.6
118
104
  type: :runtime
119
105
  prerelease: false
120
106
  version_requirements: !ruby/object:Gem::Requirement
121
107
  requirements:
122
- - - "~>"
108
+ - - '='
123
109
  - !ruby/object:Gem::Version
124
- version: '1.1'
110
+ version: 0.9.6
125
111
  - !ruby/object:Gem::Dependency
126
- name: pdfinfo
112
+ name: mini_magick
127
113
  requirement: !ruby/object:Gem::Requirement
128
114
  requirements:
129
115
  - - "~>"
130
116
  - !ruby/object:Gem::Version
131
- version: '1.4'
117
+ version: '4.3'
132
118
  type: :runtime
133
119
  prerelease: false
134
120
  version_requirements: !ruby/object:Gem::Requirement
135
121
  requirements:
136
122
  - - "~>"
137
123
  - !ruby/object:Gem::Version
138
- version: '1.4'
124
+ version: '4.3'
139
125
  - !ruby/object:Gem::Dependency
140
- name: pdfkit
126
+ name: deep_dive
141
127
  requirement: !ruby/object:Gem::Requirement
142
128
  requirements:
143
129
  - - "~>"
144
130
  - !ruby/object:Gem::Version
145
- version: '0.8'
131
+ version: '0.3'
146
132
  type: :runtime
147
133
  prerelease: false
148
134
  version_requirements: !ruby/object:Gem::Requirement
149
135
  requirements:
150
136
  - - "~>"
151
137
  - !ruby/object:Gem::Version
152
- version: '0.8'
153
- - !ruby/object:Gem::Dependency
154
- name: awesome_print
155
- requirement: !ruby/object:Gem::Requirement
156
- requirements:
157
- - - ">="
158
- - !ruby/object:Gem::Version
159
- version: '0'
160
- type: :development
161
- prerelease: false
162
- version_requirements: !ruby/object:Gem::Requirement
163
- requirements:
164
- - - ">="
165
- - !ruby/object:Gem::Version
166
- version: '0'
167
- - !ruby/object:Gem::Dependency
168
- name: equivalent-xml
169
- requirement: !ruby/object:Gem::Requirement
170
- requirements:
171
- - - ">="
172
- - !ruby/object:Gem::Version
173
- version: '0'
174
- type: :development
175
- prerelease: false
176
- version_requirements: !ruby/object:Gem::Requirement
177
- requirements:
178
- - - ">="
179
- - !ruby/object:Gem::Version
180
- version: '0'
181
- - !ruby/object:Gem::Dependency
182
- name: rake
183
- requirement: !ruby/object:Gem::Requirement
184
- requirements:
185
- - - ">="
186
- - !ruby/object:Gem::Version
187
- version: '0'
188
- type: :development
189
- prerelease: false
190
- version_requirements: !ruby/object:Gem::Requirement
191
- requirements:
192
- - - ">="
193
- - !ruby/object:Gem::Version
194
- version: '0'
138
+ version: '0.3'
195
139
  - !ruby/object:Gem::Dependency
196
- name: rspec
140
+ name: chromaprint
197
141
  requirement: !ruby/object:Gem::Requirement
198
142
  requirements:
199
- - - ">="
143
+ - - "~>"
200
144
  - !ruby/object:Gem::Version
201
- version: '0'
202
- type: :development
145
+ version: 0.0.2
146
+ type: :runtime
203
147
  prerelease: false
204
148
  version_requirements: !ruby/object:Gem::Requirement
205
149
  requirements:
206
- - - ">="
150
+ - - "~>"
207
151
  - !ruby/object:Gem::Version
208
- version: '0'
152
+ version: 0.0.2
209
153
  - !ruby/object:Gem::Dependency
210
- name: nokogiri
154
+ name: naturally
211
155
  requirement: !ruby/object:Gem::Requirement
212
156
  requirements:
213
- - - ">="
157
+ - - "~>"
214
158
  - !ruby/object:Gem::Version
215
- version: '0'
216
- type: :development
159
+ version: '2.1'
160
+ type: :runtime
217
161
  prerelease: false
218
162
  version_requirements: !ruby/object:Gem::Requirement
219
163
  requirements:
220
- - - ">="
164
+ - - "~>"
221
165
  - !ruby/object:Gem::Version
222
- version: '0'
223
- description: Collection of tools and classes that help to identify file formats and
224
- create derivative copies.
166
+ version: '2.1'
167
+ description: Collection of tools and classes that help to identify formats of binary
168
+ files and create derivative copies (e.g. PDF from Word).
225
169
  email:
226
170
  - kris.dekeyser@libis.be
227
171
  executables:
228
- - droid_tool
229
- - fido_tool
172
+ - droid
173
+ - fido
230
174
  - formatinfo
231
175
  - libis_format
232
- - pdf_tool
176
+ - pdf_copy
233
177
  extensions: []
234
178
  extra_rdoc_files: []
235
179
  files:
180
+ - ".coveralls.yml"
181
+ - ".gitignore"
182
+ - ".travis.yml"
236
183
  - Gemfile
237
184
  - LICENSE.txt
238
185
  - README.md
239
- - bin/droid_tool
240
- - bin/fido_tool
186
+ - Rakefile
187
+ - base/Dockerfile
188
+ - base/Dockerfile.alpine
189
+ - base/Dockerfile.rvm
190
+ - base/rework_path
191
+ - bin/droid
192
+ - bin/fido
241
193
  - bin/formatinfo
242
194
  - bin/libis_format
243
- - bin/pdf_tool
244
- - data/AdobeRGB1998.icc
195
+ - bin/pdf_copy
245
196
  - data/ISOcoated_v2_eci.icc
246
197
  - data/PDFA_def.ps
247
198
  - data/ead.xsd
199
+ - data/eciRGB_v2.icc
248
200
  - data/lias_formats.xml
249
201
  - data/types.yml
250
202
  - data/xlink.xsd
203
+ - docker_cfg.yml
251
204
  - lib/libis-format.rb
252
205
  - lib/libis/format.rb
253
206
  - lib/libis/format/cli/convert.rb
@@ -260,37 +213,43 @@ files:
260
213
  - lib/libis/format/converter/audio_converter.rb
261
214
  - lib/libis/format/converter/base.rb
262
215
  - lib/libis/format/converter/chain.rb
263
- - lib/libis/format/converter/email_converter.rb
264
216
  - lib/libis/format/converter/fop_pdf_converter.rb
217
+ - lib/libis/format/converter/image_assembler.rb
265
218
  - lib/libis/format/converter/image_converter.rb
219
+ - lib/libis/format/converter/image_splitter.rb
220
+ - lib/libis/format/converter/image_watermarker.rb
266
221
  - lib/libis/format/converter/jp2_converter.rb
267
222
  - lib/libis/format/converter/office_converter.rb
223
+ - lib/libis/format/converter/pdf_assembler.rb
268
224
  - lib/libis/format/converter/pdf_converter.rb
225
+ - lib/libis/format/converter/pdf_optimizer.rb
226
+ - lib/libis/format/converter/pdf_splitter.rb
227
+ - lib/libis/format/converter/pdf_watermarker.rb
269
228
  - lib/libis/format/converter/repository.rb
270
229
  - lib/libis/format/converter/spreadsheet_converter.rb
271
230
  - lib/libis/format/converter/video_converter.rb
272
231
  - lib/libis/format/converter/xslt_converter.rb
273
232
  - lib/libis/format/identifier.rb
233
+ - lib/libis/format/info.rb
234
+ - lib/libis/format/library.rb
274
235
  - lib/libis/format/tool.rb
275
236
  - lib/libis/format/tool/droid.rb
276
237
  - lib/libis/format/tool/extension_identification.rb
277
- - lib/libis/format/tool/ff_mpeg.rb
238
+ - lib/libis/format/tool/ffmpeg.rb
278
239
  - lib/libis/format/tool/fido.rb
279
240
  - lib/libis/format/tool/file_tool.rb
280
241
  - lib/libis/format/tool/fop_pdf.rb
281
242
  - lib/libis/format/tool/identification_tool.rb
282
- - lib/libis/format/tool/msg_to_pdf.rb
283
243
  - lib/libis/format/tool/office_to_pdf.rb
244
+ - lib/libis/format/tool/pdf_copy.rb
284
245
  - lib/libis/format/tool/pdf_merge.rb
285
246
  - lib/libis/format/tool/pdf_optimizer.rb
286
247
  - lib/libis/format/tool/pdf_split.rb
287
248
  - lib/libis/format/tool/pdf_to_pdfa.rb
288
- - lib/libis/format/tool/pdf_tool.rb
289
249
  - lib/libis/format/tool/pdfa_validator.rb
290
250
  - lib/libis/format/tool/spreadsheet_to_ods.rb
291
- - lib/libis/format/type_database.rb
292
- - lib/libis/format/type_database_impl.rb
293
251
  - lib/libis/format/version.rb
252
+ - lib/libis/format/yaml_loader.rb
294
253
  - libis-format.gemspec
295
254
  - tools/PdfTool.jar
296
255
  - tools/bcpkix-jdk15on-1.49.jar
@@ -345,14 +304,13 @@ files:
345
304
  - tools/fop/lib/xmlgraphics-commons-2.3.jar
346
305
  - tools/fop/lib/xmlgraphics-commons.LICENSE.txt
347
306
  - tools/fop/lib/xmlgraphics-commons.NOTICE.txt
348
- - tools/pdf2pdfa
349
- - tools/pdfbox/pdfbox-app-3.0.3.jar
350
- - tools/pdfbox/preflight-app-3.0.3.jar
307
+ - tools/pdfbox/pdfbox-app-2.0.13.jar
308
+ - tools/pdfbox/preflight-app-2.0.13.jar
351
309
  homepage: ''
352
310
  licenses:
353
311
  - MIT
354
312
  metadata: {}
355
- post_install_message:
313
+ post_install_message:
356
314
  rdoc_options: []
357
315
  require_paths:
358
316
  - lib
@@ -360,15 +318,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
360
318
  requirements:
361
319
  - - ">="
362
320
  - !ruby/object:Gem::Version
363
- version: '3.2'
321
+ version: '0'
364
322
  required_rubygems_version: !ruby/object:Gem::Requirement
365
323
  requirements:
366
324
  - - ">="
367
325
  - !ruby/object:Gem::Version
368
326
  version: '0'
369
327
  requirements: []
370
- rubygems_version: 3.5.18
371
- signing_key:
328
+ rubygems_version: 3.0.8
329
+ signing_key:
372
330
  specification_version: 4
373
331
  summary: LIBIS File format format services.
374
332
  test_files: []
Binary file
@@ -1,35 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative 'base'
4
-
5
- require 'libis/format/tool/msg_to_pdf'
6
- require 'libis/format/type_database'
7
- require 'rexml/document'
8
-
9
- module Libis
10
- module Format
11
- module Converter
12
- class EmailConverter < Libis::Format::Converter::Base
13
- def self.input_types
14
- [:MSG]
15
- end
16
-
17
- def self.output_types(format = nil)
18
- return [] unless input_types.include?(format)
19
-
20
- [:PDF]
21
- end
22
-
23
- def email_convert(_)
24
- # force usage of this converter
25
- end
26
-
27
- def convert(source, target, format, opts = {})
28
- super
29
-
30
- Format::Tool::MsgToPdf.run(source, target)
31
- end
32
- end
33
- end
34
- end
35
- end