ExifTool Forum

ExifTool => Developers => Topic started by: elhiero on March 19, 2025, 02:50:05 PM

Title: ask for metadata type
Post by: elhiero on March 19, 2025, 02:50:05 PM
Hi all
In the software I'm developing (GUI for ExifTool), I propose that the user build an IF instruction for exiftool.
For example, there's a "metadata" field where he writes IPTC:Title , and a "Value" field where he writes 'Victory'.
Between these two fields, I'll propose to add the operators eq, ne, ge, gt, ...
If he's chosen Exif:Aperture# and 2.8, I have to propose the operators ==, >, >= ...
Can I easily query exiftool to determine whether IPTC:Title, or Exif:Aperture, or any other metadata is text or numeric type?

Translated with DeepL.com (free version)
Title: Re: ask for metadata type
Post by: StarGeek on March 19, 2025, 06:08:40 PM
Quote from: elhiero on March 19, 2025, 02:50:05 PMhe writes IPTC:Title

There is no "IPTC:Title" tag. There's the XMP:Title which is part of the Dublin Core and the IPTC Photo Metadata Standard (https://www.iptc.org/std/photometadata/specification/IPTC-PhotoMetadata#title). The corresponding tag for XMP:Title is IPTC:ObjectName.

See the -listx option (https://exiftool.org/exiftool_pod.html#list--listw--listf--listr--listwf--listg-NUM--listd--listx--listgeo) which outputs all the tags in XML, but be aware, the output is extensive.

A snippet of the XML using the command
exiftool -listx -s -f
<table name='IPTC::ApplicationRecord' g0='IPTC' g1='IPTC' g2='Other'>
 <tag id='0' name='ApplicationRecordVersion' type='int16u' writable='true' flags='Mandatory'/>
 <tag id='3' name='ObjectTypeReference' type='string' count='67' writable='true'/>
 <tag id='4' name='ObjectAttributeReference' type='string' count='68' writable='true' flags='List'/>
 <tag id='5' name='ObjectName' type='string' count='64' writable='true'/>
 <tag id='7' name='EditStatus' type='string' count='64' writable='true'/>
 <tag id='8' name='EditorialUpdate' type='digits' count='2' writable='true'/>
 <tag id='10' name='Urgency' type='digits' count='1' writable='true'/>
 <tag id='12' name='SubjectReference' type='string' count='236' writable='true' flags='List'/>
 <tag id='15' name='Category' type='string' count='3' writable='true'/>
 <tag id='20' name='SupplementalCategories' type='string' count='32' writable='true' flags='List'/>
 <tag id='22' name='FixtureIdentifier' type='string' count='32' writable='true'/>
 <tag id='25' name='Keywords' type='string' count='64' writable='true' flags='List'/>
Title: Re: ask for metadata type
Post by: elhiero on March 19, 2025, 07:05:39 PM
Ok I hadn't thought of listx , thank you!  But it's apparently a job that will exceed my skills, I'll convert everything to text and use the text comparison operators ...  :-[