Data Driven Category Output

Started by Darius1968, June 15, 2016, 02:19:21 PM

Previous topic - Next topic

Darius1968

I set up a data driven category based on XMP::iptcCore\CreatorContactInfoCiUrlWork\CreatorWorkURL\0. 
Some of my files have more than one website in that field.  The separation of these entries is via a simple carriage return.  I can't seem to figure out how to properly implement the "Value Splitting" part of the dialog.  I enabled it, and then put this in for separators, "{lf};{cr}", without the quotes, of course!  What am I doing wrong, and how do I do it right? 

Mario

#1
Have you tried \r\n ?

If this is a repeatable (Bag) ExifTool usually delivers the values separated by ; not by carriage return linefeed.
Can you provide a sample file?

Darius1968

\r\n doesn't work either.  I've attached a sample file. 

Mario

The community software stripped all metadata from your sample file.
Please always ZIP image files before uploading to retain all contained metadata.

Darius1968

Sorry!  This reply contains that original file embedded in a ZIP folder. 

Mario

Thanks. That one was OK.

The official IPTC IPTCCore documentation say:

QuoteThe contact information web address part. Multiple addresses can be given. May have to be separated by a comma in the user interface.

Your file has only one {File.MD.XMP::iptcCore\CreatorContactInfoCiUrlWork\CreatorWorkURL\0} tag. It contains multiple URLs, separated by a single line feed (ASCII 0x10) character.

This cannot be handled by the value splitting in data-driven categories. They don' support control characters like line-feed.

Solution:

You can create a data-driven category based on the variable for this tag. This allows you to use a replace formatting function to replace the line-feed character with a ;, and then perform the value splitting using that comma.

Use this variable:

{File.MD.XMP::iptcCore\CreatorContactInfoCiUrlWork\CreatorWorkURL\0|replace:{lf}==;}

enable value splitting and use ; as the value separator. This will break your single URL into multiple urls.

Note: Performance of data-driven categories based on variables is worse than normal categories.

Alternative:

Use a Metadata Template (same variable) to update affected files. Replace the single line-feed in the URL with a ; or , or whatever you prefer.
After fixing the metadata, create a data-driven category on the official tag.