Thread

Posted on Mon Apr 16 23:40:27 2007 by linuxuser
Multiple keywords
i refer to the example at the homepage:

exiftool -keywords=EXIF -keywords=editor dst.jpg Replace existing keyword list with two new keywords (EXIF and editor).


What do I need the hold keywords together, e.g.: _"Phil's Exif" Tool_ and not _Exif Phil's Tool_. I doesn't work with

-IPTC:Keywords="Phil's Exif" -IPTC:Keywords="Tool"
Direct Responses: 4901 | Write a response
Posted on Tue Apr 17 02:20:24 2007 by exiftool in response to 4898
Re: Multiple keywords
Sorry, I don't get it again.

What you posted will work, and enter 2 new keywords:

1) "Phil's Exif"

2) "Tool"

When you extract them, keywords are separated by a comma, so the output will look like:

"Phil's Exif, Tool"

Isn't that what you wanted?

- Phil
Direct Responses: 4902 | Write a response
Posted on Tue Apr 17 03:03:16 2007 by linuxuser in response to 4901
Re: Multiple keywords
Sorry Phil, I didnt realize that there is a difference between EXIF and IPTC, when I posted the example. There is another example

exiftool -EXIF:XPKeywords="Phil's Exif" -EXIF:XPKeywords="Tool" -IPTC:Keywords="Phil's Exif" -IPTC: +Keywords="Tool" test.jpg exiftool -G -H -EXIF:XPKeywords -IPTC:Keywords test.jpg [EXIF] 0x9c9e XP Keywords : Tool [IPTC] 0x0019 Keywords : Phil's Exif, Tool


The example is from a commandline now. XPKeywords always stores the last keyword with my syntax. Maybe I have a quoting problem with my bash-script too. I will check it, after I know, what I did wrong with the XP Keywords. I would also like to mention, that I would like to import the keywords as tags to flickr. Is another syntax possible to create multiple keywords? I create a keyword list with sed and can put any delimiter in the text string. It doesn't work with flickr to write all keywords like

exiftool -EXIF:XPKeywords="Phil's Exif,Tool" -IPTC:Keywords="Phil's Exif,Tool" test.jpg


I tried also other variations as delimiter like a blank. It is ok with flickr only if I use -IPTC:Keywords=... -IPTC:Keywords=... The command is stored in a variable of the bash-script and I execute it without quotes, eg. exiftool $CMD (and not "$CMD"), where CMD="-IPTC:Keywords=... -IPTC:Keywords=..."
Direct Responses: 4907 | Write a response
Posted on Tue Apr 17 14:35:21 2007 by exiftool in response to 4902
Re: Multiple keywords
Ah. This is the difference between a normal tag and a "list" tag. In the tag name documentation, the "list" tags are indicated by a '+' sign in the Writable column. Multiple copies of these tags can be written, and when extracting they are combined into a single comma-separated list for convenience. The XPComment tag is not one of these tags, so you must write the exact string you want returned. ie)

exiftool -xpkeywords="Phil's Exif, Tool" -keywords="Phil's Exif" -keywords="Tool" test.jpg

- Phil
Direct Responses: 6735 | Write a response
Posted on Fri Dec 21 00:28:14 2007 by adrianb in response to 4907
Re: Multiple keywords

Hi. I have a problem which I think is related to this. I am trying to copy across my IPTC tags to Windows XP tags, so that I can search for photos in Windows by tags. At the moment I am using the following:

exiftool -ObjectName>XPTitle -Caption-Abstract>XPSubject -Keywords>XPKeywords test.jpg

All is working well apart from the keywords - only the first word on the list is copied across. I am guessing this is because IPTC Keywords is a list tag and XP Keywords is a normal text tag. Is there any way to convert from one to the other?

Thanks,

Adrian
Direct Responses: 6736 | Write a response
Posted on Fri Dec 21 01:25:41 2007 by exiftool in response to 6735
Re: Multiple keywords
Hi Adrian,

I have anticipated your question, and ExifTool 7.07 (released a couple of days ago) will allow you to do what you want. With this version, list-type tags are concatinated in a comma-delimited list when copied to a non-list tag.

(you've gotta admit... sometimes I'm good)

- Phil
Direct Responses: 6737 | Write a response
Posted on Fri Dec 21 02:08:52 2007 by adrianb in response to 6736
Re: Multiple keywords

Wow, that was pretty impressive. Hooray for concatenation.

That was obviously just too easy, so here's another one. Now I'd like to be able to take the IPTC location tags (City, Sub-location, etc.) and add them to my shiny new XP Keywords. My first step was to try:

exiftool -City+>XPKeywords

but this didn't work because XP Keywords is not a list. Is there a way to append text to normal tags like this? I suppose I could first add them to IPTC Keywords and then copy the whole lot across, but that doesn't seem like the most efficient approach.

Direct Responses: 6738 | Write a response
Posted on Fri Dec 21 02:33:28 2007 by exiftool in response to 6737
Re: Multiple keywords
This is too easy as well, you're going to have to do better... ;)

The -tagsFromFile option (which you are using implicitly when copying tags) supports copying from a string in which you can embed tags, like this:

exiftool "-xpkeywords<$xpkeywords, $city" FILE

Note that you must use single quotes in Unix shells, or double quotes as above in Windows. Read the -TagsFromFile section in the application documentation for more details.

- Phil
Direct Responses: 6742 | Write a response
Posted on Fri Dec 21 18:27:12 2007 by linuxuser in response to 6738
Re: Multiple keywords
Was there a change from 7.06 to 7.07? Tags are not imported to Flickr anymore, when I use 7.07, but it works with 7.06. With 7.07 Flickr imports all tags as 1 tag. I import the tags from a file.
Direct Responses: 6743 | Write a response
Posted on Fri Dec 21 19:22:11 2007 by exiftool in response to 6742
Re: Multiple keywords
Yes, there was a change in the way tags are copied if the source tag is a list. I have just looked into this and there is a bug in the new code. I will fix this and release 7.08 shortly. Thanks for pointing this out.

- Phil
Write a response