ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: raulc on September 13, 2017, 12:54:37 PM

Title: custom IPTC field as list
Post by: raulc on September 13, 2017, 12:54:37 PM
currently i have a config file that defines some custom iptc fields.

%Image::ExifTool::UserDefined = (
    'Image::ExifTool::IPTC::ApplicationRecord' => {
        201 => {
            Name => 'IPTC201',
            Format => 'string[0,24]',
        },
    },
);
1; #end


i can use it and can write text values to it.

however i would like to add multiple list-values to it - like with keywords.
i am using the -csv option to import the values from a csv file.

whatever i do, even using -sep, does not seem to work.

thanks.
Title: Re: custom IPTC field as list
Post by: StarGeek on September 13, 2017, 01:24:05 PM
This thread (https://exiftool.org/forum/index.php?topic=6864.0) has the answer (this post (https://exiftool.org/forum/index.php/topic,6864.msg34405.html#msg34405) in particular).

Looking at the definition for keywords (https://sourceforge.net/p/exiftool/code/ci/master/tree/lib/Image/ExifTool/IPTC.pm#l318), which is a list type tag, it looks like you need to add Flags => 'List', to your definition.
Title: Re: custom IPTC field as list
Post by: raulc on September 13, 2017, 03:17:26 PM
yes that worked.

:)

thanks.