ExifTool Forum

ExifTool => Newbies => Topic started by: mrharel on May 04, 2020, 06:18:07 PM

Title: Creatiing duplicates tags
Post by: mrharel on May 04, 2020, 06:18:07 PM
Hi,
I want to create a user defined tag, like so:
%Image::ExifTool::UserDefined = (
    'Image::ExifTool::XMP::Main' => {
        Facebook => { # <-- must be the same as the NAMESPACE prefix
            SubDirectory => {
                TagTable => 'Image::ExifTool::UserDefined::Facebook',
                # (see the definition of this table below)
            },
        },
    },
);

%Image::ExifTool::UserDefined::MyNS = (
    GROUPS        => { 0 => 'XMP', 1 => 'XMP-MyNS', 2 => 'Image' },
    NAMESPACE     => { 'MyNS' => 'http://ns.myname.com/MyNS/1.0/' },
    WRITABLE      => 'string', # (default to string-type tags)
    myname => { },
    myage => {}
);

1;  #end


but i want to allow to create duplicates of these tags since the file might be tagged by a few users along the way.
so first user will do exiftool -myname=user1 -myage=20 img1.jpg
and then this user send the image to someone else who wants to add his tag
exiftool -myname=user2 -myage=30 img1.jpg

but currently the user2 tag override the user1 tag. is there a way to allow both of them to add their info?

thanks!
Title: Re: Creatiing duplicates tags
Post by: StarGeek on May 04, 2020, 07:15:07 PM
Creating tags isn't my best area of experience, but try this change
myname => {List => 'Bag' },
myage => {List => 'Bag'}
Title: Re: Creatiing duplicates tags
Post by: Phil Harvey on May 04, 2020, 09:50:37 PM
Yes, a List-type tag is the way to do this.  And use += to add new values.

But your config file needs some work.  You reference a UserDefined::Facebook table, but table you define is called MyNS.

- Phil