multi_exiftool 0.4.2 → 0.4.3
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 +4 -4
- data/{CHANGELOG → Changelog} +4 -0
- data/LICENSE +1 -1
- data/README.rdoc +4 -4
- data/Rakefile +5 -4
- data/lib/multi_exiftool/values.rb +1 -1
- data/lib/multi_exiftool.rb +1 -1
- data/test/temp/a.jpg +0 -0
- data/test/temp/b.jpg +0 -0
- data/test/temp/c.jpg +0 -0
- data/test/test_functional_api.rb +0 -4
- data/test/test_values.rb +8 -1
- data/test/test_values_using_groups.rb +2 -2
- data/test/test_writer.rb +0 -4
- metadata +9 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 770fbc9d8a918ec8e55c71edcc2f9d608a644f11
|
4
|
+
data.tar.gz: 744d23ddd5976dc1434a63410ea6a202a83fe507
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f2d4d8875e05eede4367d5cde53581c2f09035495b80e7b495a3720c4be220ec5c244540cb71ebffe10e876e440b43fee6fc70af29902974bf1ee6a59a6731df
|
7
|
+
data.tar.gz: 5a221b09c6087da17049204d4079335b706e2941191d879c6c3515b88e01dd1a970fdd605552dd2be1aa0302895b0514f55383fd1b6289f54f5d454865827ed4
|
data/{CHANGELOG → Changelog}
RENAMED
data/LICENSE
CHANGED
data/README.rdoc
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
== Description
|
4
4
|
|
5
|
-
This library is wrapper for the
|
5
|
+
This library is wrapper for the ExifTool command-line application
|
6
6
|
(http://www.sno.phy.queensu.ca/~phil/exiftool) written by Phil Harvey.
|
7
7
|
It is designed for dealing with multiple files at once by creating
|
8
8
|
commands to call exiftool with various arguments, call it and parsing
|
@@ -64,7 +64,7 @@ See the examples in the examples directory.
|
|
64
64
|
== Requirements
|
65
65
|
|
66
66
|
- Ruby 1.9.1 or higher
|
67
|
-
- An installation of the
|
67
|
+
- An installation of the ExifTool command-line application (version 7.65 or
|
68
68
|
higher). Instructions for installation you can find under
|
69
69
|
http://www.sno.phy.queensu.ca/~phil/exiftool/install.html .
|
70
70
|
- If you have problems with special characters (like German umlauts) in
|
@@ -73,7 +73,7 @@ or higher.
|
|
73
73
|
|
74
74
|
== Installation
|
75
75
|
|
76
|
-
First you need
|
76
|
+
First you need ExifTool (see under Requirements above). Then you can simply
|
77
77
|
install the gem with
|
78
78
|
gem install multi_exiftool
|
79
79
|
|
@@ -93,7 +93,7 @@ Jan Friedrich <janfri26gmail.com>
|
|
93
93
|
|
94
94
|
The MIT License
|
95
95
|
|
96
|
-
Copyright (c) 2009-
|
96
|
+
Copyright (c) 2009-2016 Jan Friedrich
|
97
97
|
|
98
98
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
99
99
|
of this software and associated documentation files (the "Software"), to deal
|
data/Rakefile
CHANGED
@@ -5,14 +5,14 @@ require 'regtest/task'
|
|
5
5
|
|
6
6
|
Rim.setup do |p|
|
7
7
|
p.name = 'multi_exiftool'
|
8
|
-
p.version = '0.4.
|
8
|
+
p.version = '0.4.3'
|
9
9
|
p.authors = 'Jan Friedrich'
|
10
10
|
p.email = 'janfri26@gmail.com'
|
11
|
-
p.summary = 'This library is a wrapper for the
|
12
|
-
p.description = 'This library a is wrapper for the
|
11
|
+
p.summary = 'This library is a wrapper for the ExifTool command-line application (http://www.sno.phy.queensu.ca/~phil/exiftool).'
|
12
|
+
p.description = 'This library a is wrapper for the ExifTool command-line application (http://www.sno.phy.queensu.ca/~phil/exiftool) written by Phil Harvey. It is designed for dealing with multiple files at once by creating commands to call exiftool with various arguments, call it and parsing the results.'
|
13
13
|
p.ruby_version = '>=1.9.1'
|
14
14
|
p.license = 'MIT'
|
15
|
-
p.homepage = '
|
15
|
+
p.homepage = 'https://github.com/janfri/multi_exiftool'
|
16
16
|
p.install_message = %q{
|
17
17
|
+-----------------------------------------------------------------------+
|
18
18
|
| Please ensure you have installed exiftool version 7.65 or higher and |
|
@@ -23,4 +23,5 @@ Rim.setup do |p|
|
|
23
23
|
}
|
24
24
|
p.development_dependencies << 'contest' << 'regtest'
|
25
25
|
p.requirements << 'exiftool, version 7.65 or higher'
|
26
|
+
p.test_warning = false
|
26
27
|
end
|
@@ -46,7 +46,7 @@ module MultiExiftool
|
|
46
46
|
def parse_value val
|
47
47
|
return val unless val.kind_of?(String)
|
48
48
|
case val
|
49
|
-
when /^(\d{4}):(\d\d):(\d\d) (\d\d):(\d\d)(?::(\d\d))?([-+]\d\d:\d\d)?$/
|
49
|
+
when /^(\d{4}):(\d\d):(\d\d) (\d\d):(\d\d)(?::(\d\d))?([-+]\d\d:\d\d)?(?: *DST)?$/
|
50
50
|
arr = $~.captures[0,6].map {|cap| cap.to_i}
|
51
51
|
arr << $7 if $7
|
52
52
|
Time.new(*arr)
|
data/lib/multi_exiftool.rb
CHANGED
@@ -61,7 +61,7 @@ module MultiExiftool
|
|
61
61
|
@exiftool_version = nil
|
62
62
|
end
|
63
63
|
|
64
|
-
#
|
64
|
+
# ExifTool version as float (since exiftool versions
|
65
65
|
# are numbered "float friendly")
|
66
66
|
def exiftool_version
|
67
67
|
@exiftool_version ||= `#{exiftool_command} -ver`.to_f
|
data/test/temp/a.jpg
CHANGED
Binary file
|
data/test/temp/b.jpg
CHANGED
Binary file
|
data/test/temp/c.jpg
CHANGED
Binary file
|
data/test/test_functional_api.rb
CHANGED
@@ -121,10 +121,6 @@ class TestFunctionalApi < Test::Unit::TestCase
|
|
121
121
|
end
|
122
122
|
end
|
123
123
|
|
124
|
-
test 'option with value argument' do
|
125
|
-
pend 'find a good example' if respond_to? :pend
|
126
|
-
end
|
127
|
-
|
128
124
|
test 'numerical flag' do
|
129
125
|
run_in_temp_dir do
|
130
126
|
values = {orientation: 2}
|
data/test/test_values.rb
CHANGED
@@ -37,7 +37,8 @@ class TestValues < Test::Unit::TestCase
|
|
37
37
|
'TimestampWithoutSeconds' => '2009:08:25 12:35',
|
38
38
|
'TimestampWithoutZone' => '2009:08:25 12:35:42',
|
39
39
|
'TimestampWithPositiveZone' => '2009:08:26 20:22:24+05:00',
|
40
|
-
'TimestampWithNegativeZone' => '2009:08:26 20:22:24-07:00'
|
40
|
+
'TimestampWithNegativeZone' => '2009:08:26 20:22:24-07:00',
|
41
|
+
'TimestampWithZoneAndDST' => '2016:07:23 15:40:55+02:00 DST'
|
41
42
|
}
|
42
43
|
@values = MultiExiftool::Values.new(hash)
|
43
44
|
end
|
@@ -60,6 +61,12 @@ class TestValues < Test::Unit::TestCase
|
|
60
61
|
assert_equal -7 * 3600, values_time.utc_offset
|
61
62
|
end
|
62
63
|
|
64
|
+
test 'Time object with zone and DST' do
|
65
|
+
time = Time.new(2016,7, 23,15, 40,55,'+02:00')
|
66
|
+
values_time = @values['TimestampWithZoneAndDST']
|
67
|
+
assert_equal time, values_time
|
68
|
+
end
|
69
|
+
|
63
70
|
end
|
64
71
|
|
65
72
|
context 'other values' do
|
@@ -36,7 +36,7 @@ class TestValuesUsingGroups < Test::Unit::TestCase
|
|
36
36
|
assert_equal @values.exif, $block_self
|
37
37
|
assert_equal @values.exif, res
|
38
38
|
@values.iptc do
|
39
|
-
assert false, "This block should not be executed because IPTC isn't
|
39
|
+
assert false, "This block should not be executed because IPTC isn't available."
|
40
40
|
end
|
41
41
|
end
|
42
42
|
|
@@ -54,7 +54,7 @@ class TestValuesUsingGroups < Test::Unit::TestCase
|
|
54
54
|
assert_equal self, $self
|
55
55
|
assert_equal @values.exif, res
|
56
56
|
@values.iptc do
|
57
|
-
assert false, "This block should not be executed because IPTC isn't
|
57
|
+
assert false, "This block should not be executed because IPTC isn't available."
|
58
58
|
end
|
59
59
|
end
|
60
60
|
|
data/test/test_writer.rb
CHANGED
@@ -87,10 +87,6 @@ class TestWriter < Test::Unit::TestCase
|
|
87
87
|
assert_equal exiftool_args, @writer.exiftool_args
|
88
88
|
end
|
89
89
|
|
90
|
-
test 'options with value argument' do
|
91
|
-
pend 'find a good example' if respond_to? :pend
|
92
|
-
end
|
93
|
-
|
94
90
|
test 'numerical flag' do
|
95
91
|
@writer.values = {comment: 'foo'}
|
96
92
|
@writer.numerical = true
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: multi_exiftool
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Friedrich
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-08-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rim
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '2.
|
19
|
+
version: '2.9'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '2.
|
26
|
+
version: '2.9'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: contest
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -52,7 +52,7 @@ dependencies:
|
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
|
-
description: This library a is wrapper for the
|
55
|
+
description: This library a is wrapper for the ExifTool command-line application (http://www.sno.phy.queensu.ca/~phil/exiftool)
|
56
56
|
written by Phil Harvey. It is designed for dealing with multiple files at once by
|
57
57
|
creating commands to call exiftool with various arguments, call it and parsing the
|
58
58
|
results.
|
@@ -61,7 +61,7 @@ executables: []
|
|
61
61
|
extensions: []
|
62
62
|
extra_rdoc_files: []
|
63
63
|
files:
|
64
|
-
-
|
64
|
+
- Changelog
|
65
65
|
- LICENSE
|
66
66
|
- README.rdoc
|
67
67
|
- Rakefile
|
@@ -88,7 +88,7 @@ files:
|
|
88
88
|
- test/test_values_using_groups.rb
|
89
89
|
- test/test_writer.rb
|
90
90
|
- test/test_writer_groups.rb
|
91
|
-
homepage:
|
91
|
+
homepage: https://github.com/janfri/multi_exiftool
|
92
92
|
licenses:
|
93
93
|
- MIT
|
94
94
|
metadata: {}
|
@@ -114,9 +114,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
114
114
|
requirements:
|
115
115
|
- exiftool, version 7.65 or higher
|
116
116
|
rubyforge_project:
|
117
|
-
rubygems_version: 2.
|
117
|
+
rubygems_version: 2.6.6
|
118
118
|
signing_key:
|
119
119
|
specification_version: 4
|
120
|
-
summary: This library is a wrapper for the
|
120
|
+
summary: This library is a wrapper for the ExifTool command-line application (http://www.sno.phy.queensu.ca/~phil/exiftool).
|
121
121
|
test_files: []
|
122
|
-
has_rdoc:
|