Re: IPTC Info
Re: IPTC Info
- Subject: Re: IPTC Info
- From: Ron Bishop <email@hidden>
- Date: Fri, 23 May 2003 09:59:14 -0500
You can use Graphic Converter, Photoshop 7, iViewMedia Pro - all are
scriptable,but you have to open the file.
You can use Image Info II to check the file without opening it.
Also if you want, you can use Image::IPTCInfo in PERL to see/write
certain formats without opening the file. Wrap it in an Applescript
like so..(this checks the caption, but you can do other IPTC).
###############
property newline : ASCII character 10
property tmpfile : "/tmp/execme"
tell application "Finder"
set theitem to selection as alias
set theFilename to name of theitem
set theFolder to container of theitem as alias
set thePOSIXPath to POSIX path of theFolder
end tell
set theScript to "#!/usr/bin/perl" & newline & "use Image::IPTCInfo;" &
newline ,
& "chdir('" & thePOSIXPath & "');" & newline & "my @files = ('" &
theFilename & ,
"');" & newline & "foreach my $filename (@files)" & newline & "{" &
newline & ,
"my $info = new Image::IPTCInfo($filename);" & newline & ,
"my $keywordsRef = $info->Keywords();" & newline & ,
"print\" \". $info->Attribute('caption/abstract') . \"\";" & newline &
"}" & newline & ,
"exit;"
do shell script "echo " & quoted form of theScript & " > " & tmpfile
do shell script "chmod +x " & tmpfile
set theTextResult to do shell script tmpfile
display dialog theTextResult
###############
This can be cleaned up or modified... (there's no check to see if the
caption exists) and run from the script menu, iKey, Big Cat...
Ron Bishop
On Thursday, May 22, 2003, at 12:33 PM, Steve Suranie wrote:
Is there a way to check if a Photoshop 6.0 file either has IPTC data
entered for it or infomation entered in the File Info area.
Thanks
Steve
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.