Metadata Keywords from .ai files not visible in Bridge

Started by stewbrinegar, September 08, 2011, 03:46:14 PM

Previous topic - Next topic

stewbrinegar

I'm using applescript and exiftool to assign keywords to some Illustrator (CS5) files, so that people will be able to search/filter the keywords in Adobe Bridge. I use the following script for .tif files, and it works perfectly:

--* IMAGE METADATA* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-- takes a list of keywords and a POSIX path to an image. Then it appends the EXIF keywords to the image
--it also eliminates duplicate keywords
--requires the exif tool, available at http://www.exiftool.org/index.html

on TagThisImage(thisImage, theseKeywords)

set quotedImage to quoted form of thisImage

--for testing- shows all info about an image
do shell script "exiftool -a -u -g1 " & quotedImage

--get the keywords that are already in the image
set ImageKeywords to (do shell script "exiftool -keywords " & quotedImage)
log "Image Keywords " & ImageKeywords
--split these keywords into a list, remove the "Keywords:" from the beginning
if ImageKeywords is not equal to "" then
set myOldDelimeters to AppleScript's text item delimiters
set text item delimiters to ", "
set ImageKeywords to my RemoveDuplicateListItems(every text item of ImageKeywords)
set text item delimiters to myOldDelimeters
try
set (item 1 of ImageKeywords) to words 2 thru end of (item 1 of ImageKeywords)
end try
end if
--make one big list, and purge the duplicate entries
set theseKeywords to theseKeywords & ImageKeywords
set theseKeywords to my RemoveDuplicateListItems(theseKeywords)
log "Keywords I am putting in this image " & (theseKeywords as list)

set keywordslist to ""
repeat with j from 1 to the count of theseKeywords
set the keywordslist to keywordslist & ¬
" -keywords+=" & "\"" & item j of theseKeywords & "\""
end repeat

do shell script "exiftool -keywords= " & quotedImage
set myShellScript to "exiftool " & keywordslist & " " & quotedImage
set output to do shell script myShellScript
try
do shell script "rm " & quoted form of (thisImage & "_original")
end try
end TagThisImage


When I run the same script on an illustrator file, it assigns keywords, but they are not visible in Bridge. Looking at the image data
do shell script "exiftool -a -u -g1 " & quotedImage
shows that the keywords from an .ai file live in the "Subject" and "Heirarchical Subject" fields, but any modification of these fields (exif -Subject+=) still won't show the keyword in Bridge.
Thoughts?

Phil Harvey

Did you try writing the keywords in Bridge, then using exiftool -a -G1 to see where they went?  It is likely that bridge is just looking in a different location in .ai files, but you should be able to write them there too with exiftool.

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