libis-format 0.9.45 → 0.9.46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 90f7a025d3c3669dbb927c8c9b15c69f2d56920e
4
- data.tar.gz: 2f44a0d3433882991a5bb2f68a40b0b68c1ae6e8
3
+ metadata.gz: c702defaa0d1e02ec76075f37ef75296420f25d7
4
+ data.tar.gz: 388175008ed119a9245a66bf3f325c561f63251b
5
5
  SHA512:
6
- metadata.gz: ac9e8ca2115f0d57fd3d161bbab2e9ecd5d1f7e08b2517bfaa5793a644555921ea404f806f2a99cba44044b72f236636cadd4a4258a199ec0fbed1021dfd095a
7
- data.tar.gz: 2a61012eb18282b6f0164abf4948d5018e207c414cebc489296b50679594877c4bd33cd38003901ec0d05a6349fa25fd06e98ecb2707207e3aced31e9c173b1c
6
+ metadata.gz: 4bdbc44e8424e749d22a34acfe1d94138708cc4e5df3fe3795bd2531a0ae89bec1c52fd911f12544fe5319ca55f212f885939721c6d317773837d8ec3f749a71
7
+ data.tar.gz: 0fd44ec84de3896163df19f69bd2eef5f5910f358794a83698355c530d8f35f8d6e377f7135c9d970674269628e6a01a1c315ebb6101798ee02ed866e075060d
data/README.md CHANGED
@@ -128,7 +128,7 @@ XML type you should add an entry to your Type Database with the same MIME-type.
128
128
  :mimetype => "image/bmp",
129
129
  :format_name => "Windows Bitmap",
130
130
  :format_version => "3.0",
131
- :source => :droid,
131
+ :tool => :droid,
132
132
  :TYPE => :BMP,
133
133
  :GROUP => :IMAGE,
134
134
  :score => 7
@@ -139,7 +139,7 @@ XML type you should add an entry to your Type Database with the same MIME-type.
139
139
  :format_version => "Windows Bitmap 3.0",
140
140
  :mimetype => "image/bmp",
141
141
  :matchtype => "signature",
142
- :source => :fido,
142
+ :tool => :fido,
143
143
  :TYPE => :BMP,
144
144
  :GROUP => :IMAGE,
145
145
  :score => 7
@@ -147,7 +147,7 @@ XML type you should add an entry to your Type Database with the same MIME-type.
147
147
  [2] {
148
148
  :mimetype => "image/bmp",
149
149
  :matchtype => "magic",
150
- :source => :file,
150
+ :tool => :file,
151
151
  :TYPE => :BMP,
152
152
  :GROUP => :IMAGE,
153
153
  :score => 2
@@ -161,7 +161,7 @@ XML type you should add an entry to your Type Database with the same MIME-type.
161
161
  :mimetype => "image/jp2",
162
162
  :format_name => "JP2 (JPEG 2000 part 1)",
163
163
  :format_version => "",
164
- :source => :droid,
164
+ :tool => :droid,
165
165
  :TYPE => :JP2,
166
166
  :GROUP => :IMAGE,
167
167
  :score => 7
@@ -172,7 +172,7 @@ XML type you should add an entry to your Type Database with the same MIME-type.
172
172
  :format_version => "JPEG2000",
173
173
  :mimetype => "image/jp2",
174
174
  :matchtype => "signature",
175
- :source => :fido,
175
+ :tool => :fido,
176
176
  :TYPE => :JP2,
177
177
  :GROUP => :IMAGE,
178
178
  :score => 7
@@ -180,7 +180,7 @@ XML type you should add an entry to your Type Database with the same MIME-type.
180
180
  [2] {
181
181
  :mimetype => "image/jp2",
182
182
  :matchtype => "magic",
183
- :source => :file,
183
+ :tool => :file,
184
184
  :TYPE => :JP2,
185
185
  :GROUP => :IMAGE,
186
186
  :score => 2
@@ -196,7 +196,7 @@ XML type you should add an entry to your Type Database with the same MIME-type.
196
196
  :mimetype => "image/bmp",
197
197
  :format_name => "Windows Bitmap",
198
198
  :format_version => "3.0",
199
- :source => :droid,
199
+ :tool => :droid,
200
200
  :TYPE => :BMP,
201
201
  :GROUP => :IMAGE,
202
202
  :score => 7
@@ -208,7 +208,7 @@ XML type you should add an entry to your Type Database with the same MIME-type.
208
208
  :mimetype => "image/jp2",
209
209
  :format_name => "JP2 (JPEG 2000 part 1)",
210
210
  :format_version => "JPEG2000",
211
- :source => :droid,
211
+ :tool => :droid,
212
212
  :TYPE => :JP2,
213
213
  :GROUP => :IMAGE,
214
214
  :score => 7
@@ -220,7 +220,7 @@ XML type you should add an entry to your Type Database with the same MIME-type.
220
220
  :mimetype => "image/tiff",
221
221
  :format_name => "Tagged Image File Format",
222
222
  :format_version => "TIFF generic (little-endian)",
223
- :source => :droid,
223
+ :tool => :droid,
224
224
  :TYPE => :TIFF,
225
225
  :GROUP => :IMAGE,
226
226
  :score => 7
@@ -232,7 +232,7 @@ XML type you should add an entry to your Type Database with the same MIME-type.
232
232
  :mimetype => "image/tiff",
233
233
  :format_name => "Exchangeable Image File Format (Uncompressed)",
234
234
  :format_version => "2.2",
235
- :source => :droid,
235
+ :tool => :droid,
236
236
  :TYPE => :TIFF,
237
237
  :GROUP => :IMAGE,
238
238
  :score => 7,
@@ -243,7 +243,7 @@ XML type you should add an entry to your Type Database with the same MIME-type.
243
243
  :format_version => "TIFF generic (little-endian)",
244
244
  :mimetype => "image/tiff",
245
245
  :matchtype => "signature",
246
- :source => :fido,
246
+ :tool => :fido,
247
247
  :TYPE => :TIFF,
248
248
  :GROUP => :IMAGE,
249
249
  :score => 7
@@ -255,7 +255,7 @@ XML type you should add an entry to your Type Database with the same MIME-type.
255
255
  :mimetype => "image/tiff",
256
256
  :format_name => "Exchangeable Image File Format (Uncompressed)",
257
257
  :format_version => "2.2",
258
- :source => :droid,
258
+ :tool => :droid,
259
259
  :TYPE => :TIFF,
260
260
  :GROUP => :IMAGE,
261
261
  :score => 7
@@ -269,7 +269,7 @@ XML type you should add an entry to your Type Database with the same MIME-type.
269
269
  :mimetype => "archive/ead",
270
270
  :format_name => "Encoded Archival Description (EAD)",
271
271
  :format_version => "",
272
- :source => :xsd_validation,
272
+ :tool => :xsd_validation,
273
273
  :TYPE => :EAD,
274
274
  :GROUP => :ARCHIVE,
275
275
  :score => 7,
@@ -283,7 +283,7 @@ XML type you should add an entry to your Type Database with the same MIME-type.
283
283
  :mimetype => "application/msword",
284
284
  :format_name => "Microsoft Word Document",
285
285
  :format_version => "97-2003",
286
- :source => :droid,
286
+ :tool => :droid,
287
287
  :TYPE => :MSDOC,
288
288
  :GROUP => :TEXT,
289
289
  :score => 9,
@@ -295,7 +295,7 @@ XML type you should add an entry to your Type Database with the same MIME-type.
295
295
  :mimetype => "application/msword",
296
296
  :format_name => "Microsoft Word Document",
297
297
  :format_version => "97-2003",
298
- :source => :droid,
298
+ :tool => :droid,
299
299
  :TYPE => :MSDOC,
300
300
  :GROUP => :TEXT,
301
301
  :score => 9
@@ -306,7 +306,7 @@ XML type you should add an entry to your Type Database with the same MIME-type.
306
306
  :format_version => "OLE2 Compound Document Format",
307
307
  :mimetype => nil,
308
308
  :matchtype => "signature",
309
- :source => :fido,
309
+ :tool => :fido,
310
310
  :score => 3
311
311
  }
312
312
  ]
@@ -318,7 +318,7 @@ XML type you should add an entry to your Type Database with the same MIME-type.
318
318
  :mimetype => "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
319
319
  :format_name => "Microsoft Word for Windows",
320
320
  :format_version => "2007 onwards",
321
- :source => :droid,
321
+ :tool => :droid,
322
322
  :TYPE => :MSDOCX,
323
323
  :GROUP => :TEXT,
324
324
  :score => 9
@@ -330,7 +330,7 @@ XML type you should add an entry to your Type Database with the same MIME-type.
330
330
  :mimetype => "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
331
331
  :format_name => "Microsoft Excel for Windows",
332
332
  :format_version => "2007 onwards",
333
- :source => :droid,
333
+ :tool => :droid,
334
334
  :TYPE => :MSXLSX,
335
335
  :GROUP => :TABULAR,
336
336
  :score => 9,
@@ -342,7 +342,7 @@ XML type you should add an entry to your Type Database with the same MIME-type.
342
342
  :mimetype => "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
343
343
  :format_name => "Microsoft Excel for Windows",
344
344
  :format_version => "2007 onwards",
345
- :source => :droid,
345
+ :tool => :droid,
346
346
  :TYPE => :MSXLSX,
347
347
  :GROUP => :TABULAR,
348
348
  :score => 9
@@ -350,7 +350,7 @@ XML type you should add an entry to your Type Database with the same MIME-type.
350
350
  [1] {
351
351
  :mimetype => "application/octet-stream",
352
352
  :matchtype => "magic",
353
- :source => :file,
353
+ :tool => :file,
354
354
  :score => -2
355
355
  }
356
356
  ]
@@ -362,7 +362,7 @@ XML type you should add an entry to your Type Database with the same MIME-type.
362
362
  :mimetype => "application/pdf",
363
363
  :format_name => "Acrobat PDF/A - Portable Document Format",
364
364
  :format_version => "1b",
365
- :source => :droid,
365
+ :tool => :droid,
366
366
  :TYPE => :PDFA,
367
367
  :GROUP => :TEXT,
368
368
  :score => 7,
@@ -373,7 +373,7 @@ XML type you should add an entry to your Type Database with the same MIME-type.
373
373
  :format_version => "PDF 1.5",
374
374
  :mimetype => "application/pdf",
375
375
  :matchtype => "signature",
376
- :source => :fido,
376
+ :tool => :fido,
377
377
  :TYPE => :PDF,
378
378
  :GROUP => :TEXT,
379
379
  :score => 7
@@ -385,7 +385,7 @@ XML type you should add an entry to your Type Database with the same MIME-type.
385
385
  :mimetype => "application/pdf",
386
386
  :format_name => "Acrobat PDF/A - Portable Document Format",
387
387
  :format_version => "1b",
388
- :source => :droid,
388
+ :tool => :droid,
389
389
  :TYPE => :PDFA,
390
390
  :GROUP => :TEXT,
391
391
  :score => 7
@@ -154,12 +154,6 @@ VIDEO:
154
154
  MIME: video/webm
155
155
  EXTENSIONS: webm
156
156
 
157
- FLASH:
158
- NAME: Macromedia Flash
159
- MIME: application/x-shockwave-flash
160
- PUID: fmt/104 fmt/105 fmt/106 fmt/107 fmt/108 fmt/109 fmt/110
161
- EXTENSIONS: swf
162
-
163
157
  MKV:
164
158
  NAME: Matroska Multimedia Container (MKV)
165
159
  MIME: video/x-matroska
@@ -202,12 +196,18 @@ VIDEO:
202
196
  PUID: x-fmt/152
203
197
  EXTENSIONS: dv
204
198
 
205
- FLASH:
199
+ FLV:
206
200
  NAME: Flash video (FLV)
207
201
  MIME: video/x-flv
208
202
  PUID: x-fmt/382
209
203
  EXTENSIONS: flv
210
204
 
205
+ SWF:
206
+ NAME: Macromedia Flash
207
+ MIME: application/x-shockwave-flash
208
+ PUID: fmt/104 fmt/105 fmt/106 fmt/107 fmt/108 fmt/109 fmt/110
209
+ EXTENSIONS: swf
210
+
211
211
  TEXT:
212
212
 
213
213
  TXT:
@@ -10,12 +10,12 @@ module Libis
10
10
  class VideoConverter < Libis::Format::Converter::Base
11
11
 
12
12
  def self.input_types
13
- [:WEBM, :M4V, :MPEG, :MJP2, :QTFF, :AVI, :OGGV, :WMV, :DV, :FLASH]
13
+ [:WEBM, :MP4, :MPG, :MKV, :MJP2, :QTFF, :AVI, :OGGV, :WMV, :DV, :FLV, :SWF]
14
14
  end
15
15
 
16
16
  def self.output_types(format = nil)
17
17
  return [] unless input_types.include?(format)
18
- [:GIF, :AVI, :FLV, :MKV, :MOV, :MP4, :MPG, :OGGV, :SWF, :WEBM, :WMV]
18
+ [:GIF, :WEBM, :MP4, :MPG, :MKV, :MJP2, :QTFF, :AVI, :OGGV, :WMV, :DV, :FLV, :SWF]
19
19
  end
20
20
 
21
21
  def initialize
@@ -131,7 +131,7 @@ module Libis
131
131
  begin
132
132
  if doc.validates_against?(xsd_file)
133
133
  log_msg result, :debug, "XML file validated against XML Schema: #{xsd_file}"
134
- info = {mimetype: mime, tool: file_result[:source], source: :xsd_validation, match_type: 'xsd_validation', format_version: '', }
134
+ info = {mimetype: mime, tool_raw: file_result[:tool], tool: :xsd_validation, match_type: 'xsd_validation', format_version: '', }
135
135
  file_result.merge! Libis::Format::TypeDatabase.enrich(info, PUID: :puid, MIME: :mimetype, NAME: :format_name)
136
136
  end
137
137
  rescue => e
@@ -159,7 +159,7 @@ module Libis
159
159
  mimetype: 'application/octet-stream',
160
160
  puid: 'fmt/unknown',
161
161
  score: 0,
162
- source: nil
162
+ tool: nil
163
163
  }
164
164
  else
165
165
  format_matches = output.group_by {|x| [x[:mimetype], x[:puid]]}
@@ -62,7 +62,7 @@ module Libis
62
62
  r.delete(:mod_time)
63
63
  r.delete(:hash)
64
64
  r.delete(:format_count)
65
- r[:source] = :droid
65
+ r[:tool] = :droid
66
66
  end
67
67
  File.delete report
68
68
  process_output(result)
@@ -44,7 +44,7 @@ module Libis
44
44
  mimetype: (info[:MIME].first rescue nil),
45
45
  puid: (info[:PUID].first rescue nil),
46
46
  matchtype: 'extension',
47
- source: :type_database
47
+ tool: :type_database
48
48
  }
49
49
  end
50
50
  end.cleanup
@@ -88,7 +88,7 @@ module Libis
88
88
  r.delete(:time)
89
89
  r.delete(:status)
90
90
  r.delete(:filesize)
91
- r[:source] = :fido
91
+ r[:tool] = :fido
92
92
  end
93
93
  end
94
94
 
@@ -67,7 +67,7 @@ module Libis
67
67
  # Parse output text into array and return result
68
68
  file_tool[:out].map do |line|
69
69
  r = line.split(/:\s+/)
70
- {filepath: r[0], mimetype: r[1], matchtype: 'magic', source: :file}
70
+ {filepath: r[0], mimetype: r[1], matchtype: 'magic', tool: :file}
71
71
  end
72
72
  end
73
73
 
@@ -1,5 +1,5 @@
1
1
  module Libis
2
2
  module Format
3
- VERSION = '0.9.45'
3
+ VERSION = '0.9.46'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: libis-format
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.45
4
+ version: 0.9.46
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kris Dekeyser
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-11-21 00:00:00.000000000 Z
11
+ date: 2017-11-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler