Sha256: 1db6b0f615c722144862e6e16471ace3da509eaf9ea7af010d1cd48876480f63

Contents?: true

Size: 833 Bytes

Versions: 9

Compression:

Stored size: 833 Bytes

Contents

#!/usr/bin/env ruby
# frozen_string_literal: true
# encoding: UTF-8
# (c) ANB Andrew Bizyaev

require_relative '_tag_array_of_strings'

module ExifTagger
  module Tag
    # MWG:Creator, string[0,32]+, List of strings
    #   EXIF:Artist, IPTC:By-line, XMP-dc:Creator
    # exiftool types:
    #   Artist = String "aaa; bbb"
    #   By-line = Array ["aaa", "bbb"] OR String "aaa"
    #   Creator = Array ["aaa", "bbb"] OR String "aaa"

    class Creator < TagArrayOfStrings
      MAX_BYTESIZE = 32
      EXIFTOOL_TAGS = %w(Artist By-line Creator).freeze

      private

      def generate_write_script_lines
        @value.each do |o|
          unless Tag.empty?(o)
            @write_script_lines << %(-MWG:Creator-=#{o})
            @write_script_lines << %(-MWG:Creator+=#{o})
          end
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
phtools-0.18.0 lib/phtools/exif_tagger/tags/creator.rb
phtools-0.17.0 lib/phtools/exif_tagger/tags/creator.rb
phtools-0.16.1 lib/phtools/exif_tagger/tags/creator.rb
phtools-0.16.0 lib/phtools/exif_tagger/tags/creator.rb
phtools-0.15.1 lib/phtools/exif_tagger/tags/creator.rb
phtools-0.15.0 lib/phtools/exif_tagger/tags/creator.rb
phtools-0.14.0 lib/phtools/exif_tagger/tags/creator.rb
phtools-0.11.2 lib/phtools/exif_tagger/tags/creator.rb
phtools-0.11.1 lib/phtools/exif_tagger/tags/creator.rb