ask for metadata type

Started by elhiero, March 19, 2025, 02:50:05 PM

Previous topic - Next topic

elhiero

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)

StarGeek

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. The corresponding tag for XMP:Title is IPTC:ObjectName.

See the -listx option 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'/>
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

elhiero

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 ...  :-[