filentory-cli 0.6.0 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8025b30dc7c2e2477a598eae39b2b6f97b5c3d943e20c86ab91afc79dbf09da6
4
- data.tar.gz: 96fe3c7a799792f9f9795d1422c305dbe4a982655278cdad3d0ef4f9b3124a10
3
+ metadata.gz: 307312ea2dea8e660b841675965449e18e7ab48ed12b312069b5c76b7d055b43
4
+ data.tar.gz: 6c3021db554c8faca87162b65fce934e191635517beddbd5a85a77c17122e72d
5
5
  SHA512:
6
- metadata.gz: 73acadfa4e80f30b1e8e09df60e9f0cdac59195cc97e32767f512852870f55864a6ae4407aa0586a4517eb2c4592d055cce958452460a3294465c084c853130b
7
- data.tar.gz: c9daa0c46a00ecb055ab672cc419e1a756b688f6f474ad60ab38b473333f6b753e105b30f74ba518a2d29b759abd9be8efc0cface2ac1c2878d937b633595e08
6
+ metadata.gz: 56061f79eb77d0ece58324bd5e355c89cbd47d0ce4a57446b0fb436b7be5f52d637c20a2ce763eb90b1224bbfed959b7500f2aa313b82fba0b8168402ea4aad4
7
+ data.tar.gz: a7fea9405eaa995eaa838ab692fc985363a707aaef2dffa4c037d3f2594588cc074e6a51e6a33a1ad7b74358c096fc87e820077bef4eef618c41edbfc38bf042
@@ -4,7 +4,9 @@ require 'methadone/cucumber'
4
4
  require 'json_spec/cucumber'
5
5
 
6
6
  PROJECT_ROOT = File.join(File.dirname(__FILE__),'..','..')
7
+ #puts PROJECT_ROOT
7
8
  ENV['PATH'] = "#{File.join(PROJECT_ROOT,'bin')}#{File::PATH_SEPARATOR}#{ENV['PATH']}"
9
+ #puts ENV['PATH']
8
10
  ARUBA_DIR = File.join(%w(tmp aruba))
9
11
  Before do
10
12
  @dirs = [ARUBA_DIR]
@@ -25,4 +27,4 @@ After do
25
27
  # Put back how it was
26
28
  ENV['RUBYLIB'] = @original_rubylib
27
29
  ENV['RUBYOPT'] = @original_rubyopt
28
- end
30
+ end
@@ -22,7 +22,7 @@ class Collector
22
22
  end
23
23
  result << extract_file_infos(file)
24
24
  rescue => file_error
25
- error ("error with file '#{path}': #{file}")
25
+ error ("error with file '#{path}': #{file} => #{file_error}")
26
26
  end
27
27
  end
28
28
 
@@ -67,4 +67,4 @@ class Collector
67
67
  end
68
68
 
69
69
  end
70
- end
70
+ end
@@ -1,7 +1,8 @@
1
- require 'exifr'
1
+ require 'exifr/jpeg'
2
2
  require 'xmp'
3
+ require 'methadone'
3
4
 
4
- class ExifExtractor
5
+ class ExifExtractor include Methadone::CLILogging
5
6
 
6
7
  # Extracts the metadata of a file at a given path in the file system.
7
8
  def metadata_for_file(file_path)
@@ -32,8 +33,8 @@ class ExifExtractor
32
33
  namespace = xmp.send(namespace_name)
33
34
  extract_namespace_attributes(namespace_name, namespace, xmpValues)
34
35
  end
35
- rescue => error
36
- #puts error
36
+ rescue => error_message
37
+ error ("#{error_message}")
37
38
  end
38
39
 
39
40
  def extract_namespace_attributes(namespace_name, namespace, xmpValues)
@@ -43,8 +44,8 @@ class ExifExtractor
43
44
  #puts "returnval: #{returnval}"
44
45
  answer = returnval.scrub("*")
45
46
  xmpValues["#{namespace_name}.#{attr}"] = answer.strip.to_s[0...250]
46
- rescue => error
47
- #puts error
47
+ rescue => error_message
48
+ error ("#{error_message}")
48
49
  end
49
50
  end
50
51
  end
@@ -57,8 +58,8 @@ class ExifExtractor
57
58
  xmpValues["exif.date_time_original"] = format_date(img.date_time_original)
58
59
  xmpValues["exif.width"] = img.width
59
60
  xmpValues["exif.height"] = img.height
60
- rescue => error
61
- #puts error
61
+ rescue => error_message
62
+ error ("#{error_message}")
62
63
  end
63
64
 
64
65
  def cleanup_metadata(value)
@@ -90,4 +91,4 @@ class ExifExtractor
90
91
  rescue
91
92
  nil
92
93
  end
93
- end
94
+ end
@@ -1,3 +1,3 @@
1
1
  module Filentory
2
- VERSION = "0.6.0"
2
+ VERSION = "0.6.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: filentory-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Johnny Graber