Writing a custom field

Started by johnbeardy, April 30, 2010, 01:51:49 PM

Previous topic - Next topic

Lito

#15
Is it possible to write custom metadata flatter?

This is what it looks like in the file when written with exifTool.
<xwnv:AM_WebPaths>
            <rdf:Alt>
               <rdf:li xml:lang="x-default">True</rdf:li>
            </rdf:Alt>
         </xwnv:AM_WebPaths>

And this is how it looks when written with our file managing system.

<xwnv:AM_WebPaths>True</xwnv:AM_WebPaths>

Our file managing system accepts both ways fine, but when later reading this info in a third system i got issues with the ones written with exifTool.

My custom config looks like this.

%Image::ExifTool::UserDefined::xwnv = (
    GROUPS => { 0 => 'XMP', 1 => 'XMP-xwnv', 2 => 'Image' },
    NAMESPACE => { 'xwnv' => 'http://ns.xinet.com/ns/xinetschema#'; },
    WRITABLE => 'string',
    # Example 8. XMP-xwnv:AM_Status
    # - replace "NewXMPxxxTag1" with your own tag name (eg. "MyTag")
    AM_Status => { Writable => 'lang-alt' },
    # Example 9.  XMP-xwnv:AM_WebPaths
    AM_WebPaths => { Writable => 'lang-alt' },
    # Example 10.  XMP-xxx:NewXMPxxxTag3

Edit: Spellcheck

Phil Harvey

Remove the "Writable => 'lang-alt'".

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Lito

Quote from: Phil Harvey on June 27, 2016, 10:07:33 AM
Remove the "Writable => 'lang-alt'".

- Phil

Thank you Phil, works just fine.