multi_exiftool 0.16.0 → 0.17.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Changelog +7 -0
- data/README.md +1 -1
- data/lib/multi_exiftool/values.rb +5 -1
- data/lib/multi_exiftool.rb +1 -1
- data/multi_exiftool.gemspec +10 -20
- data/test/data/example.config +1 -1
- data/test/test_functional_api.rb +4 -4
- data/test/test_reader.rb +3 -3
- data/test/test_values.rb +6 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2da035005cfd8b951a7cc60ecd7e1675ab9652d020f3b067ac6a3c8cd656f5a4
|
4
|
+
data.tar.gz: 913ebcb588e47bbd3a0d3ea7f8cfadba69cfd996be7508b1348f59833f719f3c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 29779137c5f5b6a4548373955f10b6ed0621001e0dcebc5779d79023a54ed35189f3bd52a29f910f2be6b88204bb77ae7084d59e7db3ac3e2058b618f875a025
|
7
|
+
data.tar.gz: 731d597e9d15160b8b3c0fed87e287f5d33ef3cb2f11184f1d16d8fe13e1a5bee0eecde4c1d49cddfe293d42f4da79d6865ceb37b8833198919f5bbee9e78260
|
data/Changelog
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# MultiExiftool
|
1
|
+
# MultiExiftool ![test workflow](https://github.com/janfri/multi_exiftool/actions/workflows/main.yml/badge.svg)
|
2
2
|
|
3
3
|
## Description
|
4
4
|
|
@@ -55,7 +55,11 @@ module MultiExiftool
|
|
55
55
|
second = $6.to_f
|
56
56
|
zone = $7
|
57
57
|
zone = '+00:00' if zone == 'Z'
|
58
|
-
|
58
|
+
begin
|
59
|
+
Time.new(year, month, day, hour, minute, second, zone)
|
60
|
+
rescue ArgumentError
|
61
|
+
val
|
62
|
+
end
|
59
63
|
when REGEXP_RATIONAL
|
60
64
|
return val if $2.to_i == 0
|
61
65
|
Rational($1, $2)
|
data/lib/multi_exiftool.rb
CHANGED
data/multi_exiftool.gemspec
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
# stub: multi_exiftool 0.
|
2
|
+
# stub: multi_exiftool 0.17.1 ruby lib
|
3
3
|
#
|
4
4
|
# This file is automatically generated by rim.
|
5
5
|
# PLEASE DO NOT EDIT IT DIRECTLY!
|
@@ -7,12 +7,12 @@
|
|
7
7
|
|
8
8
|
Gem::Specification.new do |s|
|
9
9
|
s.name = "multi_exiftool"
|
10
|
-
s.version = "0.
|
10
|
+
s.version = "0.17.1"
|
11
11
|
|
12
12
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
13
13
|
s.require_paths = ["lib"]
|
14
14
|
s.authors = ["Jan Friedrich"]
|
15
|
-
s.date = "
|
15
|
+
s.date = "2023-10-06"
|
16
16
|
s.description = "This library is a wrapper for the ExifTool command-line application (https://exiftool.org) 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."
|
17
17
|
s.email = "janfri26@gmail.com"
|
18
18
|
s.files = ["./.aspell.pws", "Changelog", "Gemfile", "LICENSE", "README.md", "Rakefile", "lib/multi_exiftool", "lib/multi_exiftool.rb", "lib/multi_exiftool/batch.rb", "lib/multi_exiftool/executable.rb", "lib/multi_exiftool/reader.rb", "lib/multi_exiftool/values.rb", "lib/multi_exiftool/writer.rb", "multi_exiftool.gemspec", "regtest/read_all_tags.rb", "regtest/read_all_tags.yml", "regtest/test.jpg", "test/data", "test/data/a.jpg", "test/data/b.jpg", "test/data/c.jpg", "test/data/example.config", "test/helper.rb", "test/test_batch.rb", "test/test_executable.rb", "test/test_exiftool_stuff.rb", "test/test_functional_api.rb", "test/test_reader.rb", "test/test_values.rb", "test/test_values_using_groups.rb", "test/test_writer.rb", "test/test_writer_groups.rb"]
|
@@ -21,24 +21,14 @@ Gem::Specification.new do |s|
|
|
21
21
|
s.post_install_message = "\n+-----------------------------------------------------------------------+\n| Please ensure you have installed exiftool version 7.65 or higher and |\n| it's found in your PATH (Try \"exiftool -ver\" on your commandline). |\n| For more details see |\n| https://exiftool.org/install.html |\n+-----------------------------------------------------------------------+\n "
|
22
22
|
s.required_ruby_version = Gem::Requirement.new(">= 1.9.1")
|
23
23
|
s.requirements = ["exiftool, version 7.65 or higher"]
|
24
|
-
s.rubygems_version = "3.
|
24
|
+
s.rubygems_version = "3.5.0.dev"
|
25
25
|
s.summary = "This library is a wrapper for the ExifTool command-line application (https://exiftool.org)."
|
26
26
|
|
27
|
-
|
28
|
-
s.specification_version = 4
|
29
|
-
end
|
27
|
+
s.specification_version = 4
|
30
28
|
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
s.add_development_dependency(%q<regtest>, ["~> 2"])
|
37
|
-
else
|
38
|
-
s.add_dependency(%q<rake>, [">= 0"])
|
39
|
-
s.add_dependency(%q<rim>, ["~> 2.17"])
|
40
|
-
s.add_dependency(%q<contest>, ["~> 0.1"])
|
41
|
-
s.add_dependency(%q<test-unit>, [">= 0"])
|
42
|
-
s.add_dependency(%q<regtest>, ["~> 2"])
|
43
|
-
end
|
29
|
+
s.add_development_dependency(%q<rake>, [">= 0"])
|
30
|
+
s.add_development_dependency(%q<rim>, ["~> 2.17"])
|
31
|
+
s.add_development_dependency(%q<contest>, ["~> 0.1"])
|
32
|
+
s.add_development_dependency(%q<test-unit>, [">= 0"])
|
33
|
+
s.add_development_dependency(%q<regtest>, ["~> 2"])
|
44
34
|
end
|
data/test/data/example.config
CHANGED
@@ -167,7 +167,7 @@
|
|
167
167
|
# specified, then at least one of the Desire'd tags must exist. See
|
168
168
|
# the Composite table in Image::ExifTool::Exif for more examples,
|
169
169
|
# and lib/Image/ExifTool/README for all of the details.
|
170
|
-
|
170
|
+
MyBaseName => {
|
171
171
|
Require => {
|
172
172
|
0 => 'FileName',
|
173
173
|
},
|
data/test/test_functional_api.rb
CHANGED
@@ -62,12 +62,12 @@ class TestFunctionalApi < Test::Unit::TestCase
|
|
62
62
|
|
63
63
|
test 'successful reading with user defined tags in config file' do
|
64
64
|
run_in_temp_dir do
|
65
|
-
values, errors = MultiExiftool.read(%w[a.jpg b.jpg c.jpg], tags: %w[
|
66
|
-
assert_equal [nil, nil, nil], values.map(&:
|
65
|
+
values, errors = MultiExiftool.read(%w[a.jpg b.jpg c.jpg], tags: %w[mybasename fileextension])
|
66
|
+
assert_equal [nil, nil, nil], values.map(&:mybasename)
|
67
67
|
assert_equal [nil, nil, nil], values.map(&:file_extension)
|
68
68
|
assert_equal [], errors
|
69
|
-
values, errors = MultiExiftool.read(%w[a.jpg b.jpg c.jpg], config: 'example.config', tags: %w[
|
70
|
-
assert_equal %w[a b c], values.map(&:
|
69
|
+
values, errors = MultiExiftool.read(%w[a.jpg b.jpg c.jpg], config: 'example.config', tags: %w[mybasename fileextension])
|
70
|
+
assert_equal %w[a b c], values.map(&:mybasename)
|
71
71
|
assert_equal %w[jpg]*3, values.map(&:file_extension)
|
72
72
|
assert_equal [], errors
|
73
73
|
end
|
data/test/test_reader.rb
CHANGED
@@ -160,13 +160,13 @@ class TestReader < Test::Unit::TestCase
|
|
160
160
|
test 'successful reading with user defined tags in config file' do
|
161
161
|
run_in_temp_dir do
|
162
162
|
@reader.filenames = %w(a.jpg b.jpg c.jpg)
|
163
|
-
@reader.tags = %w[
|
163
|
+
@reader.tags = %w[mybasename]
|
164
164
|
res = @reader.read
|
165
|
-
assert_equal [nil, nil, nil], res.map(&:
|
165
|
+
assert_equal [nil, nil, nil], res.map(&:mybasename)
|
166
166
|
assert_equal [], @reader.errors
|
167
167
|
@reader.config = 'example.config'
|
168
168
|
res = @reader.read
|
169
|
-
assert_equal %w[a b c], res.map(&:
|
169
|
+
assert_equal %w[a b c], res.map(&:mybasename)
|
170
170
|
assert_equal [], @reader.errors
|
171
171
|
end
|
172
172
|
end
|
data/test/test_values.rb
CHANGED
@@ -120,6 +120,12 @@ class TestValues < Test::Unit::TestCase
|
|
120
120
|
assert_nil values['TimeWithOnlyZeros']
|
121
121
|
end
|
122
122
|
|
123
|
+
test 'timestamp with invalid data' do
|
124
|
+
ts = '2022:25:01 16:25'
|
125
|
+
values = MultiExiftool::Values.new('InvalidTimestamp' => ts)
|
126
|
+
assert_equal ts, values['InvalidTimestamp']
|
127
|
+
end
|
128
|
+
|
123
129
|
test 'rational with denominator zero' do
|
124
130
|
values = MultiExiftool::Values.new('DenominatorZero' => '1/0')
|
125
131
|
assert_equal '1/0', values['DenominatorZero']
|
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
|
+
version: 0.17.1
|
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: 2023-10-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -144,7 +144,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
144
144
|
version: '0'
|
145
145
|
requirements:
|
146
146
|
- exiftool, version 7.65 or higher
|
147
|
-
rubygems_version: 3.
|
147
|
+
rubygems_version: 3.5.0.dev
|
148
148
|
signing_key:
|
149
149
|
specification_version: 4
|
150
150
|
summary: This library is a wrapper for the ExifTool command-line application (https://exiftool.org).
|