RE: Adding MetaData Tags
RE: Adding MetaData Tags
- Subject: RE: Adding MetaData Tags
- From: Rick Gordon <email@hidden>
- Date: Fri, 02 Sep 2011 13:12:50 -0700
I found exiftool <http://owl.phy.queensu.ca/~phil/exiftool>. Seems like it should work, and I've got the stub of a script here:
tell application "Adobe InDesign CS5"
tell document 1
set vFileName to name
set vShortName to (characters 5 thru -6 of vFileName) as text
set vSpecificIndex to (characters 1 thru 3 of vFileName) as text
set vSectionIndex to character 1 of vFileName & "00"
set VImageList to (item link of all graphics) as list
repeat with vItem in VImageList
set vPath to POSIX path of ((file path of vItem) as alias)
set vCommand to "exiftool -keywords='" & vFileName & "' " & ¬
"-keywords+='" & vShortName & "' " & ¬
"-keywords+='" & vSpecificIndex & "' " & ¬
"-keywords+='" & vSectionIndex & "' '" & vPath & "'"
tell AppleScript to (do shell script vCommand)
update
end repeat
save
close
end tell
end tell
This works, and produces a terminal command like:
exiftool -keywords='703-Crawford.indd' -keywords+='Crawford' -keywords+='703' -keywords+='700' '/REDACTED_PATH/Links/WebBuddha.psd'
Rick Gordon
------------------
On 9/2/11 at 3:56 PM -0400, LaMonte Forthun wrote in a message entitled
"Adding MetaData Tags":
>Hi Rick,
>
>I just saw your post on the AppleScript list and wanted to know how you're looking to use the tag information. Can you use Spotlight comments or OpenMeta. I just did a Scripting project two days ago that did this if why I ask, I might have some code you can use if so. Otherwise let me know what you're looking to do and I'll see if I can help with some other code.
--
___________________________________________________
RICK GORDON
EMERALD VALLEY GRAPHICS AND CONSULTING
___________________________________________________
WWW: http://www.shelterpub.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden