filmrolls 0.1.3 → 0.2.0

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: 47c76d0b39ce19d86260e8c2099db97ba2621f72855f53e4596e11b951c6f780
4
- data.tar.gz: e80e00c4e49318a5bb033296273d2c47abc0d5004fd04847376c54ab30315f04
3
+ metadata.gz: bc2322c8fbcc81c5a5db45f32c3c936484bc2ed5ef52802b35c382c4fc32f7ce
4
+ data.tar.gz: 130a70fd8e9e36b8f2ac7a90aa12b8c7645049a095747311765b13da98b4d15d
5
5
  SHA512:
6
- metadata.gz: 7ee694d21071c1702f6b81221981c0d593828e97875c82bbb6829edf36c5b06ea1cdd65277b6e5040833a7540459655f796123a171f6591a3a57a7f51c584a59
7
- data.tar.gz: 07d72da124bae93814d8e5c57dedb059c00713b2eb7d15a0bc883896eda15d2f5d99919f03969a664a44a01c60837601729d92a97d0fc6edc1fbaf7f283cdb99
6
+ metadata.gz: da52df23af0ecfbefcfb0db808982b2a60d89c1e40329d1d3a03915814cf9f8a1a5f2948ea82c06954106dc87c532effc4beb19f22ab594a1f9e42ab76e3b94d
7
+ data.tar.gz: 9b0dd8f451a49c6450de2cb924071231a9e18d99976410f2df99573a7129e330a46c10e3596746fa764af589c0e797181b65cb98514d807c7a7741d8b6dd0a2b
data/CHANGELOG.md ADDED
@@ -0,0 +1,36 @@
1
+ # Changelog
2
+ All notable changes to this project will be documented in this file.
3
+
4
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
+
7
+ ## [Unreleased]
8
+
9
+ ## [0.2.0] - 2019-06-01
10
+ ### Added
11
+ - Support for writing author metadata (copyright, license, etc.)
12
+
13
+ ## [0.1.3] - 2019-05-30
14
+ ### Fixed
15
+ - Write APEX shutter speed values and non-APEX aperture values
16
+
17
+ ## [0.1.2] - 2019-05-29
18
+ ### Fixed
19
+ - Write correct values to GPS latitude/longitude reference fields
20
+ - Set `ISOSpeed` and `SensitivityType` EXIF tags
21
+
22
+ ## [0.1.1] - 2019-05-26
23
+ ### Fixed
24
+ - Write `ExposureTime` EXIF tag rather than `ShutterSpeedValue`
25
+ - Trim spaces from camera and lens make/model EXIF tags
26
+
27
+ ## [0.1.0] - 2019-05-24
28
+ ### Added
29
+ - First release of the `filmrolls` tool
30
+
31
+ [Unreleased]: https://github.com/urdh/filmrolls/compare/v0.2.0...HEAD
32
+ [0.2.0]: https://github.com/urdh/filmrolls/compare/v0.1.3...v0.2.0
33
+ [0.1.3]: https://github.com/urdh/filmrolls/compare/v0.1.2...v0.1.3
34
+ [0.1.2]: https://github.com/urdh/filmrolls/compare/v0.1.1...v0.1.2
35
+ [0.1.1]: https://github.com/urdh/filmrolls/compare/v0.1.0...v0.1.1
36
+ [0.1.0]: https://github.com/urdh/filmrolls/releases/tag/v0.1.0
data/filmrolls.gemspec CHANGED
@@ -19,6 +19,7 @@ Gem::Specification.new do |s|
19
19
  EOF
20
20
 
21
21
  s.files = %w[
22
+ CHANGELOG.md
22
23
  filmrolls.gemspec
23
24
  Rakefile
24
25
  README.md
@@ -28,15 +29,20 @@ Gem::Specification.new do |s|
28
29
  lib/filmrolls.rb
29
30
  lib/filmrolls/cli.rb
30
31
  lib/filmrolls/exiftool.rb
32
+ lib/filmrolls/metadata.rb
31
33
  lib/filmrolls/negative.rb
32
34
  lib/filmrolls/version.rb
33
35
  lib/filmrolls/xmlformat.rb
34
36
  test/test_helper.rb
35
37
  test/test_exiftool.rb
38
+ test/test_metadata.rb
36
39
  test/test_xmlformat.rb
37
40
  test/data/filmrolls.xml
38
41
  test/data/with-exif.tiff
39
42
  test/data/without-exif.tiff
43
+ test/data/meta-copyright.yaml
44
+ test/data/meta-creative-commons.yaml
45
+ test/data/meta-public-domain.yaml
40
46
  ]
41
47
  # TODO: how to generate the man page and inclue in the gem?
42
48
 
@@ -48,6 +54,7 @@ Gem::Specification.new do |s|
48
54
  s.require_paths = 'lib'
49
55
  s.test_files = %w[
50
56
  test/test_exiftool.rb
57
+ test/test_metadata.rb
51
58
  test/test_xmlformat.rb
52
59
  ]
53
60
 
data/lib/filmrolls.rb CHANGED
@@ -1,3 +1,4 @@
1
1
  require 'filmrolls/version'
2
2
  require 'filmrolls/negative'
3
+ require 'filmrolls/metadata'
3
4
  require 'filmrolls/xmlformat'
data/lib/filmrolls/cli.rb CHANGED
@@ -13,6 +13,9 @@ module Filmrolls
13
13
  global_option '-r', '--rolls FILE', 'Film Rolls XML file (default: stdin)' do |r|
14
14
  $rolls_file = r
15
15
  end
16
+ global_option '-m', '--meta FILE', 'Author metadata YAML file' do |r|
17
+ $yaml_file = r
18
+ end
16
19
 
17
20
  command 'list-rolls' do |c|
18
21
  c.syntax = 'filmrolls list-rolls [--rolls FILE]'
@@ -63,7 +66,7 @@ module Filmrolls
63
66
  end
64
67
 
65
68
  command :tag do |c|
66
- c.syntax = 'filmrolls tag [--dry-run] [--rolls FILE] --id ID IMAGE...'
69
+ c.syntax = 'filmrolls tag [--dry-run] [--meta FILE] [--rolls FILE] --id ID IMAGE...'
67
70
  c.summary = 'Write EXIF tags'
68
71
  c.description = 'Write EXIF tags to a set of images using data from ' \
69
72
  'film roll with ID in input.'
@@ -83,6 +86,9 @@ module Filmrolls
83
86
  abort "Expected #{roll[:frames].length} images, got #{args.length}"
84
87
  end
85
88
 
89
+ meta = get_metadata($yaml_file)
90
+ meta.each { |k, v| log k.to_s.gsub('_',' ').capitalize, v }
91
+
86
92
  roll[:frames].zip(args).each do |frame, file|
87
93
  log 'Path', file
88
94
  negative = Filmrolls::Negative.new(file)
@@ -110,6 +116,28 @@ module Filmrolls
110
116
  log 'Position', frame[:position]
111
117
  negative.position = frame[:position]
112
118
  end
119
+ negative.merge(meta)
120
+ negative.save! unless options.dry_run
121
+ end
122
+ end
123
+ end
124
+
125
+ command 'apply-metadata' do |c|
126
+ c.syntax = 'filmrolls apply-metadata [--dry-run] --meta FILE IMAGE...'
127
+ c.summary = 'Write author metadata'
128
+ c.description = 'Write author metadata to a set of images using YAML data from FILE.'
129
+ c.option '-n', '--dry-run', "Don't actually modify any files"
130
+
131
+ c.action do |args, options|
132
+ abort "A YAML file must be supplied" if $yaml_file.nil?
133
+
134
+ meta = get_metadata($yaml_file)
135
+ meta.each { |k, v| log k.to_s.gsub('_',' ').capitalize, v }
136
+
137
+ args.each do |file|
138
+ log 'Path', file
139
+ negative = Filmrolls::Negative.new(file)
140
+ negative.merge(meta)
113
141
  negative.save! unless options.dry_run
114
142
  end
115
143
  end
@@ -126,6 +154,14 @@ module Filmrolls
126
154
  abort "Could not read input XML: #{err.message}"
127
155
  end
128
156
  end
157
+
158
+ def get_metadata(file)
159
+ begin
160
+ file.nil? ? Hash.new : Filmrolls::Metadata.load(File.read(file))
161
+ rescue SystemCallError => err
162
+ abort "Could not read input YAML: #{err.message}"
163
+ end
164
+ end
129
165
  end
130
166
  end
131
167
  end
@@ -7,6 +7,7 @@ module Filmrolls
7
7
 
8
8
  def initialize(filename_or_io = nil, opts = {})
9
9
  opts[:timestamps] = DateTime unless opts.key? :timestamps
10
+ opts[:coord_format] = "%.6f degrees" unless opts.key? :coord_format
10
11
  super(filename_or_io, opts)
11
12
  end
12
13
  end
@@ -0,0 +1,81 @@
1
+ require 'yaml'
2
+
3
+ module Filmrolls
4
+ module Metadata
5
+ class Parser
6
+ def self.load(io)
7
+ doc = YAML.load(io)
8
+ # Data validation, sort of
9
+ raise 'YAML input missing `author` key' unless doc.key?('author')
10
+ raise 'YAML input missing `author.name` key' unless doc['author'].key?('name')
11
+ raise "YAML input has invalid license `#{doc['license']}`" unless is_valid_license(doc['license'])
12
+ # Output construction
13
+ {
14
+ author: doc['author']['name'],
15
+ copyright: get_copyright(doc['author']['name'], doc['license']),
16
+ author_url: doc['license'].nil? ? nil : doc['author']['url'],
17
+ license_url: get_license_url(doc['license']),
18
+ marked: !is_public_domain(doc['license']),
19
+ usage_terms: get_usage_terms(doc['author']['name'], doc['license'])
20
+ }.delete_if { |k, v| v.nil? }
21
+ end
22
+
23
+ class << self
24
+ private
25
+
26
+ def is_valid_license(license)
27
+ license.nil? or LICENSES.key?(license.to_sym)
28
+ end
29
+
30
+ def is_public_domain(license)
31
+ license == 'cc0'
32
+ end
33
+
34
+ def get_copyright(author, license)
35
+ is_public_domain(license) ?
36
+ "© #{author}, %{year}. No rights reserved." :
37
+ license.nil? ?
38
+ "© #{author}, %{year}. All rights reserved." :
39
+ "© #{author}, %{year}. Some rights reserved."
40
+ end
41
+
42
+ def get_license_url(license)
43
+ LICENSES[license.to_sym][:url] unless license.nil?
44
+ end
45
+
46
+ def get_usage_terms(author, license)
47
+ if is_public_domain(license)
48
+ [ "To the extent possible under law, #{author} has waived all",
49
+ 'copyright and related or neighboring rights to this work.' ].join(' ')
50
+ elsif not license.nil?
51
+ name = LICENSES[license.to_sym][:name]
52
+ url = LICENSES[license.to_sym][:url]
53
+ [ "This work is licensed under the Creative Commons #{name} 4.0 International License.",
54
+ "To view a copy of this license, visit #{url} or send a letter to Creative Commons,",
55
+ '171 Second Street, Suite 300, San Francisco, California, 94105, USA.' ].join(' ')
56
+ end
57
+ end
58
+
59
+ LICENSES = {
60
+ 'cc0': { 'url': 'https://creativecommons.org/publicdomain/zero/1.0/' },
61
+ 'cc-by': { 'name': 'Attribution',
62
+ 'url': 'https://creativecommons.org/licenses/by/4.0/' },
63
+ 'cc-by-sa': { 'name': 'Attribution-ShareAlike',
64
+ 'url': 'https://creativecommons.org/licenses/by-sa/4.0/' },
65
+ 'cc-by-nd': { 'name': 'Attribution-NoDerivatives',
66
+ 'url': 'https://creativecommons.org/licenses/by-nd/4.0/' },
67
+ 'cc-by-nc': { 'name': 'Attribution-NonCommercial',
68
+ 'url': 'https://creativecommons.org/licenses/by-nc/4.0/' },
69
+ 'cc-by-nc-sa': { 'name': 'Attribution-NonCommercial-ShareAlike',
70
+ 'url': 'https://creativecommons.org/licenses/by-nc-sa/4.0/' },
71
+ 'cc-by-nc-nd': { 'name': 'Attribution-NonCommercial-NoDerivatives',
72
+ 'url': 'https://creativecommons.org/licenses/by-nc-nd/4.0/' }
73
+ }
74
+ end
75
+ end
76
+
77
+ def self.load(io)
78
+ Parser.load(io)
79
+ end
80
+ end
81
+ end
@@ -3,13 +3,13 @@ require 'filmrolls/exiftool'
3
3
  module Filmrolls
4
4
  class Negative
5
5
  def initialize(path)
6
- @file = Exiftool.new(path, :coord_format => "%.6f degrees")
6
+ @file = Exiftool.new(path)
7
7
  end
8
8
 
9
- def merge(*args)
9
+ def merge(args)
10
10
  args.each do |key, value|
11
11
  method = "#{key}="
12
- @self.public_send(method, value) if @self.respond_to? method
12
+ public_send(method, value) if respond_to? method
13
13
  end
14
14
  end
15
15
 
@@ -77,5 +77,39 @@ module Filmrolls
77
77
  @file[:Make] = make.strip
78
78
  @file[:Model] = model.strip
79
79
  end
80
+
81
+ def author=(val)
82
+ @file[:Artist] = val
83
+ @file['By-Line'] = val
84
+ @file[:Author] = val
85
+ @file[:Creator] = val
86
+ @file['By-lineTitle'] = 'Photographer'
87
+ @file[:AttributionName] = val if @file[:License]
88
+ end
89
+
90
+ def copyright=(val)
91
+ year = @file[:datetimecreated] ? @file[:datetimecreated].year : DateTime.now.year
92
+ notice = (val % {:year => year})
93
+ @file[:Copyright] = notice
94
+ @file[:CopyrightNotice] = notice
95
+ @file[:Rights] = notice
96
+ end
97
+
98
+ def author_url=(val)
99
+ @file[:AttributionURL] = val
100
+ end
101
+
102
+ def license_url=(val)
103
+ @file[:License] = val
104
+ @file[:AttributionName] = @file[:Artist] if @file[:Artist]
105
+ end
106
+
107
+ def marked=(val)
108
+ @file[:Marked] = val
109
+ end
110
+
111
+ def usage_terms=(val)
112
+ @file[:UsageTerms] = val
113
+ end
80
114
  end
81
115
  end
@@ -1,3 +1,3 @@
1
1
  module Filmrolls
2
- VERSION = '0.1.3'.freeze
2
+ VERSION = '0.2.0'.freeze
3
3
  end
data/man/filmrolls.1 CHANGED
@@ -1,13 +1,13 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "FILMROLLS" "1" "May 2019" "" "filmrolls v0.1.3"
4
+ .TH "FILMROLLS" "1" "June 2019" "" "filmrolls v0.2.0"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBfilmrolls\fR \- Tag TIFF files with EXIF data extracted from XML data
8
8
  .
9
9
  .SH "SYNOPSIS"
10
- \fBfilmrolls list\-rolls [\-\-rolls FILE]\fR \fBfilmrolls list\-frames [\-\-rolls FILE] \-\-id ID\fR \fBfilmrolls tag [\-\-rolls FILE] \-\-id ID FILES\.\.\.\fR
10
+ \fBfilmrolls list\-rolls [\-\-rolls FILE]\fR \fBfilmrolls list\-frames [\-\-rolls FILE] \-\-id ID\fR \fBfilmrolls tag [\-\-meta FILE] [\-\-rolls FILE] \-\-id ID FILES\.\.\.\fR \fBfilmrolls apply\-metadata \-\-meta FILE FILES\.\.\.\fR
11
11
  .
12
12
  .SH "DESCRIPTION"
13
13
  Reads XML data from the \fIFilm Rolls\fR iOS app and displays or applies this data as EXIF tags to a given set of files\.
@@ -19,6 +19,10 @@ Reads XML data from the \fIFilm Rolls\fR iOS app and displays or applies this da
19
19
  Input XML file\. If this argument is not present, XML is read from standard input\.
20
20
  .
21
21
  .TP
22
+ \fB\-m\fR, \fB\-\-meta\fR
23
+ Input YAML file containing author metadata\. Only applicable to the \fBtag\fR and \fBapply\-metadata\fR commands\. For a brief description of the YAML keys, see \fIMETADATA FORMAT\fR\.
24
+ .
25
+ .TP
22
26
  \fB\-i\fR, \fB\-\-id\fR
23
27
  A specific film roll to work with, keyed by the \fINotes\fR field of the \fIFilm Rolls\fR content\.
24
28
  .
@@ -28,20 +32,69 @@ Don\'t actually modify any files\.
28
32
  .
29
33
  .SH "COMMANDS"
30
34
  .
35
+ .IP "\(bu" 4
36
+ \fBlist\-rolls\fR: List all film rolls in the input XML, along with some common metadata\.
37
+ .
38
+ .IP "\(bu" 4
39
+ \fBlist\-frames\fR: List all frames of the given roll in the input XML, along with all the relevant metadata\.
40
+ .
41
+ .IP "\(bu" 4
42
+ \fBtag\fR: Tag the given input files with EXIF data based on the given roll in the input XML\. All file formats supported by exiftool(1) are supported\. The number of files to tag must match the number of frames in the given roll\.
43
+ .
44
+ .IP
45
+ \fBNote:\fR No attempt to validate the file format of the target files will be made, and the command will exit after the first failure\. Use the \fB\-\-dry\-run\fR flag to verify the command\-line arguments before performing real actions\.
46
+ .
47
+ .IP "\(bu" 4
48
+ \fBapply\-metadata\fR Apply author metadata to the given input files based on the given YAML author metadata file\.
49
+ .
50
+ .IP "" 0
51
+ .
52
+ .SH "METADATA FORMAT"
53
+ The YAML author metadata format is extremely simple:
54
+ .
55
+ .IP "" 4
56
+ .
57
+ .nf
58
+
59
+ author:
60
+ name: A\. Photographer
61
+ url: https://example\.com/
62
+ license: cc\-by\-sa
63
+ .
64
+ .fi
65
+ .
66
+ .IP "" 0
67
+ .
68
+ .P
69
+ The \fBurl\fR key may be omitted, as may the \fBlicense\fR key to indicate that the usual "all rights reserved" copyright restrictions apply\. Valid values for the \fBlicense\fR key are the following:
70
+ .
31
71
  .TP
32
- \fBlist\-rolls\fR
33
- List all film rolls in the input XML, along with some common metadata\.
72
+ \fBcc0\fR
73
+ Creative Commons 1\.0 Universal Public Domain Declaration
34
74
  .
35
75
  .TP
36
- \fBlist\-frames\fR
37
- List all frames of the given roll in the input XML, along with all the relevant metadata\.
76
+ \fBcc\-by\fR
77
+ Creative Commons 4\.0 Attribution International License
38
78
  .
39
79
  .TP
40
- \fBtag\fR
41
- Tag the given input files with EXIF data based on the given roll in the input XML\. All file formats supported by exiftool(1) are supported\. The number of files to tag must match the number of frames in the given roll\.
80
+ \fBcc\-by\-sa\fR
81
+ Creative Commons 4\.0 Attribution\-ShareAlike International License
42
82
  .
43
- .IP
44
- \fBNote:\fR No attempt to validate the file format of the target files will be made, and the command will exit after the first failure\. Use the \fB\-\-dry\-run\fR flag to verify the command\-line arguments before performing real actions\.
83
+ .TP
84
+ \fBcc\-by\-nd\fR
85
+ Creative Commons 4\.0 Attribution\-NoDerivatives International License
86
+ .
87
+ .TP
88
+ \fBcc\-by\-nc\fR
89
+ Creative Commons 4\.0 Attribution\-NonCommercial International License
90
+ .
91
+ .TP
92
+ \fBcc\-by\-nc\-sa\fR
93
+ Creative Commons 4\.0 Attribution\-NonCommercial\-ShareAlike International License
94
+ .
95
+ .TP
96
+ \fBcc\-by\-nc\-nd\fR
97
+ Creative Commons 4\.0 Attribution\-NonCommercial\-NoDerivatives International License
45
98
  .
46
99
  .SH "SEE ALSO"
47
100
  exiftool(1)
@@ -0,0 +1,3 @@
1
+ author:
2
+ name: Simon Sigurdhsson
3
+ url: http://photography.sigurdhsson.org/
@@ -0,0 +1,4 @@
1
+ author:
2
+ name: Simon Sigurdhsson
3
+ url: http://photography.sigurdhsson.org/
4
+ license: cc-by-nc
@@ -0,0 +1,4 @@
1
+ author:
2
+ name: Simon Sigurdhsson
3
+ url: http://photography.sigurdhsson.org/
4
+ license: cc0
@@ -0,0 +1,104 @@
1
+ require 'test_helper'
2
+ require 'minitest/autorun'
3
+ require 'filmrolls/metadata'
4
+
5
+ describe 'Filmrolls::Metadata.load' do
6
+ describe 'a creative-commons configuration' do
7
+ let(:data) do
8
+ @output ||= Filmrolls::Metadata.load(File.read('test/data/meta-creative-commons.yaml'))
9
+ end
10
+
11
+ it 'should have the correct author' do
12
+ data[:author].must_equal 'Simon Sigurdhsson'
13
+ end
14
+
15
+ it 'should have the correct copyright string' do
16
+ data[:copyright].must_equal '© Simon Sigurdhsson, %{year}. Some rights reserved.'
17
+ end
18
+
19
+ it 'should have the correct attribution url' do
20
+ data[:author_url].must_equal 'http://photography.sigurdhsson.org/'
21
+ end
22
+
23
+ it 'should have the correct license url' do
24
+ data[:license_url].must_equal 'https://creativecommons.org/licenses/by-nc/4.0/'
25
+ end
26
+
27
+ it 'should have the marked attribute' do
28
+ data[:marked].must_equal true
29
+ end
30
+
31
+ it 'should have the correct usage terms' do
32
+ data[:usage_terms].must_equal [
33
+ 'This work is licensed under the Creative Commons',
34
+ 'Attribution-NonCommercial 4.0 International License. To view a copy',
35
+ 'of this license, visit https://creativecommons.org/licenses/by-nc/4.0/',
36
+ 'or send a letter to Creative Commons, 171 Second Street, Suite 300,',
37
+ 'San Francisco, California, 94105, USA.'
38
+ ].join(' ')
39
+ end
40
+ end
41
+
42
+ describe 'a copyright configuration' do
43
+ let(:data) do
44
+ @output ||= Filmrolls::Metadata.load(File.read('test/data/meta-copyright.yaml'))
45
+ end
46
+
47
+ it 'should have the correct author' do
48
+ data[:author].must_equal 'Simon Sigurdhsson'
49
+ end
50
+
51
+ it 'should have the correct copyright string' do
52
+ data[:copyright].must_equal '© Simon Sigurdhsson, %{year}. All rights reserved.'
53
+ end
54
+
55
+ it 'should have no attribution url' do
56
+ data.keys.wont_include :author_url
57
+ end
58
+
59
+ it 'should have no license url' do
60
+ data.keys.wont_include :license_url
61
+ end
62
+
63
+ it 'should have the marked attribute' do
64
+ data[:marked] = true
65
+ end
66
+
67
+ it 'should have no usage terms' do
68
+ data.keys.wont_include :usage_terms
69
+ end
70
+ end
71
+
72
+ describe 'a public domain configuration' do
73
+ let(:data) do
74
+ @output ||= Filmrolls::Metadata.load(File.read('test/data/meta-public-domain.yaml'))
75
+ end
76
+
77
+ it 'should have the correct author' do
78
+ data[:author].must_equal 'Simon Sigurdhsson'
79
+ end
80
+
81
+ it 'should have the correct copyright string' do
82
+ data[:copyright].must_equal '© Simon Sigurdhsson, %{year}. No rights reserved.'
83
+ end
84
+
85
+ it 'should have the correct attribution url' do
86
+ data[:author_url].must_equal 'http://photography.sigurdhsson.org/'
87
+ end
88
+
89
+ it 'should have the correct license url' do
90
+ data[:license_url].must_equal 'https://creativecommons.org/publicdomain/zero/1.0/'
91
+ end
92
+
93
+ it 'should not have the marked attribute' do
94
+ data[:marked] = false
95
+ end
96
+
97
+ it 'should have the correct usage terms' do
98
+ data[:usage_terms].must_equal [
99
+ 'To the extent possible under law, Simon Sigurdhsson has waived',
100
+ 'all copyright and related or neighboring rights to this work.'
101
+ ].join(' ')
102
+ end
103
+ end
104
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: filmrolls
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simon Sigurdhsson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-05-30 00:00:00.000000000 Z
11
+ date: 2019-06-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mini_exiftool
@@ -219,6 +219,7 @@ extra_rdoc_files:
219
219
  - LICENSE.md
220
220
  - bin/filmrolls
221
221
  files:
222
+ - CHANGELOG.md
222
223
  - LICENSE.md
223
224
  - README.md
224
225
  - Rakefile
@@ -227,15 +228,20 @@ files:
227
228
  - lib/filmrolls.rb
228
229
  - lib/filmrolls/cli.rb
229
230
  - lib/filmrolls/exiftool.rb
231
+ - lib/filmrolls/metadata.rb
230
232
  - lib/filmrolls/negative.rb
231
233
  - lib/filmrolls/version.rb
232
234
  - lib/filmrolls/xmlformat.rb
233
235
  - man/filmrolls.1
234
236
  - test/data/filmrolls.xml
237
+ - test/data/meta-copyright.yaml
238
+ - test/data/meta-creative-commons.yaml
239
+ - test/data/meta-public-domain.yaml
235
240
  - test/data/with-exif.tiff
236
241
  - test/data/without-exif.tiff
237
242
  - test/test_exiftool.rb
238
243
  - test/test_helper.rb
244
+ - test/test_metadata.rb
239
245
  - test/test_xmlformat.rb
240
246
  homepage: https://github.com/urdh/filmrolls
241
247
  licenses:
@@ -268,4 +274,5 @@ specification_version: 4
268
274
  summary: Tag TIFF files with EXIF data extracted from XML data
269
275
  test_files:
270
276
  - test/test_exiftool.rb
277
+ - test/test_metadata.rb
271
278
  - test/test_xmlformat.rb