Main Menu

Creatiing duplicates tags

Started by mrharel, May 04, 2020, 06:18:07 PM

Previous topic - Next topic

mrharel

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!

StarGeek

Creating tags isn't my best area of experience, but try this change
myname => {List => 'Bag' },
myage => {List => 'Bag'}
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

Phil Harvey

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
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).