Main Menu

Change Keywords Delimiter

Started by vbtrek, May 20, 2015, 06:51:02 PM

Previous topic - Next topic

vbtrek

I have just started using daminion, but would also still like to use windows live photo gallery for the rest of the family. Daminion writes Keywords with a delimiter of "|" whereas windows live photo gallery reads "/". How would I use ExifTool to covert from "|" to "/".

Phil Harvey

I'm afraid you'll have to be more specific.  Neither IPTC:Keywords nor XMP:Subject stores the delimiter.  The keywords are each stored separately in the metadata.  (See FAQ 17 for help on how to read/write these with ExifTool.)

Or are you talking about some other keywords tag?

- 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 ($).

StarGeek

#2
At the very basic level, the command would be something like:
ExifTool "-TAG<${TAG;s/\|/\//g}" FILE/DIR

But I suspect that it won't be as simple as that.  Daminion writes keywords to a variety of places (see the Metadata Mapping section here), and most of those places are saved as lists and don't need a delimiter.   Unless you mean a Hierarchical separator?  The different one in that group is XPKeywords, which I think uses the semicolon as a delimiter.   It's more likely that WLPG will read that.

You may have to check out FAQ 3 and figure out what the actual tags you need to look at are.

Another thing to realize is that what programs show you as a delimiter in their interface is not necessarily going to be the actual way the data is saved.

(ack, too slow with my post)

Edit: Forgot to escape the vertical bar
"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

vbtrek

My apologies, I did mean the Hierarchical separator.

StarGeek

You will still need to figure exactly which tag you need to use.  I did find a post on an Adobe forum that mentions that Photo Gallery can read XMP:Subject as hierarchical, so check that.  And because XMP:Subject is a list type tag, you'll need to read the docs on the -Sep option

Your command would end up looking something like
ExifTool -Sep ", " "-XMP:Subject<${XMP:Subject;s/\|/\//g}" FILE/DIR
though if your data contains something like "Smith, John" or "Henry Jones, Jr.", you will want to change the -Sep option to something else.
"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

vbtrek

If I have a heirarchy of:
Places -> Europe -> France
Special Occasions -> Weddings

And a photo that has both these tags assigned.

Windows Photo Gallery Tagged Photos (Descriptive Tags):
EXIF:XP Keywords = Places/Europe/France;Special Occasions/Weddings
XMP:Subject = Places/Europe/France;Special Occasions/Weddings
XMP:Last Keyword XMP = Places/Europe/France;Special Occasions/Weddings

Daminion Tagged Photos (Keywords):
EXIF:XP Keywords = Places|Europe|France;Special Occasions|Weddings
XMP:Subject = Places|Europe|France;Special Occasions|Weddings
XMP:Last Keyword XMP = Places|Europe|France;Special Occasions|Weddings
XMP:Last Keyword IPTC = Places|Europe|France;Special Occasions|Weddings
XMP:Hierarchical Subject = Places|Europe|France;Special Occasions|Weddings
XMP:Subject = Places|Europe|France;Special Occasions|Weddings
IPTC:Keywords = Places|Europe|France;Special Occasions|Weddings

My guess is that I only need to update EXIF:XP Keywords, XMP:Subject, XMP:Last Keyword XMP to replace | with / to keep the heirarchy looking correct in WLPG.

Thanks for all your help, it's much appreciated.

Phil Harvey

Right.  So using StarGeek's command and adding all the tags you want, the command would be:

ExifTool -Sep ", " "-XPKeywords<${XPKeywords;s/\|/\//g}" "-XMP:Subject<${XMP:Subject;s/\|/\//g}" "-XMP:LastKeywordXMP<${XMP:LastKeywordXMP;s/\|/\//g}" FILE/DIR

- 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 ($).