Copy link to clipboard
Copied
Copy link to clipboard
Copied
Me too! Or can it be done via a shell script and avoid PS altogether? Or should I acquire Bridge?
Copy link to clipboard
Copied
You can do it with javascript, or use do javascript from applescript.
Copy link to clipboard
Copied
Thanks Paul - BTW I'm in Morley, Leeds, not a thousand miles from you!
I think Java is somewhere I'm not ready to go... Looks like C which I studied for 2-3 months about 12 years ago!
It really needs to be an Applescript solution as it will be trawling through a Filemaker database pulling out the filenames/paths and metadata from there.
Copy link to clipboard
Copied
Not too far at all!
I would imagine you should be able to do it in applescript (foreign for me!) as in javascript it is:
var keys = app.activeDocument.info.keywords;
keys.push("newKeyword");
keys.push("anotheKeyword");
app.activeDocument.info.keywords =keys;
That makes sure the original keys are not overwritten.
Copy link to clipboard
Copied
cooroo,
If you have Photoshop you already have Bridge. However as far as I know Bridge can only be scripted with javascript.
I don't use applescript but if you can't use it directly to add keywords you could use Exiftool with applescript to avoid opening the files in Photoshop.
Copy link to clipboard
Copied
This should do it using Photoshop but Im sure there are plenty of other ways available to you that don't require the opening of files.
tell application "Adobe Photoshop CS2"
set Doc_Ref to the current document
tell Doc_Ref
set keywords of info to {"My", "key", "words", "as", "a", "list"}
end tell
end tell
Copy link to clipboard
Copied
Thanks Muppet - I was just getting there! However, with 16,000+ images I'm still hoping for a solution that doesn't require opening every file...
Copy link to clipboard
Copied
As Mike suggested, exiftool is the simplest and fastest solution.
If you need to drive it from AS in CSx, the fastest solution would be to have AS call JS (in PS) and the JS would make a call to Bridge via BridgeTalk. In Bridge, you can set keywords and other metadata without open/rendering the images.
-X
Copy link to clipboard
Copied
I have this installed but never the time to look into it:
http://www.sno.phy.queensu.ca/~phil/exiftool/
else
I think you can AppleScript Graphic Converter to do some of this stuff without the GUI opening the file.
Copy link to clipboard
Copied
I will look into the Graphic Converter solution - it would be great if that does the job direct from Applescript!
Exiftools - does this handle other formats than camera ones? I found this:
Below is a list of file types and meta information formats currently
supported by ExifTool (r = read, w = write, c = create):
File Types | Meta Information
--------------------------------------- | --------------------
3FR r HDP r/w PNG r/w | EXIF r/w/c
ACR r HTML r PPM r/w | GPS r/w/c
AI r ICC r/w/c PPT r | IPTC r/w/c
AIFF r ITC r PS r/w | XMP r/w/c
APE r JNG r/w PSD r/w | MakerNotes r/w/c
- which suggests that jpegs, tiffs and eps's are not supported, and that's what our files are!
Copy link to clipboard
Copied
Yes both EPS and TIFF are supported for a full list see http://www.sno.phy.queensu.ca/~phil/exiftool/
Copy link to clipboard
Copied
The Man Page gives me this info on the read/write/create capabilities:
EXIFTOOL(1) User Contributed Perl Documentation EXIFTOOL(1)
NAME
exiftool - Read and write meta information in files
SYNOPSIS
exiftool [OPTIONS] [-TAG...] [--TAG...] FILE...
exiftool [OPTIONS] -TAG[+-<]=[VALUE]... FILE...
exiftool [OPTIONS] -tagsFromFile SRCFILE [-SRCTAG[>DSTTAG]...] FILE...
exiftool [ -ver | -list[w|f|wf|g[NUM]|d|x] ]
For specific examples, see the EXAMPLES sections below.
DESCRIPTION
A command-line interface to Image::ExifTool, used for reading and writ-
ing meta information in image, audio and video files. FILE is a source
file name, directory name, or "-" for the standard input. Information
is read from the source file and output in readable form to the console
(or written to an output text file with the -w option).
To write or copy information, new values are specified with the
-TAG=[VALUE] syntax or the -tagsFromFile or -geotag options. This
causes FILE to be rewritten, and by default the original file is pre-
served with "_original" appended to the file name. (Be sure to verify
that the new file is OK before erasing the original.) Once in write
mode, exiftool will ignore any read-specific options.
Below is a list of file types and meta information formats currently
supported by ExifTool (r = read, w = write, c = create):
File Types | Meta Information
--------------------------------------- | --------------------
3FR r HDP r/w PNG r/w | EXIF r/w/c
ACR r HTML r PPM r/w | GPS r/w/c
AI r ICC r/w/c PPT r | IPTC r/w/c
AIFF r ITC r PS r/w | XMP r/w/c
APE r JNG r/w PSD r/w | MakerNotes r/w/c
ARW r JP2 r/w QTIF r | Photoshop IRB r/w/c
ASF r JPEG r/w RA r | ICC Profile r/w/c
AVI r K25 r RAF r/w | MIE r/w/c
BMP r KDC r RAM r | JFIF r/w/c
BTF r M4A r RAW r/w | Ducky APP12 r/w/c
CR2 r/w MEF r/w RIFF r | PDF r/w/c
CRW r/w MIE r/w/c RW2 r/w | CIFF r/w
CS1 r/w MIFF r RWZ r | AFCP r/w
DCM r MNG r/w RM r | JPEG 2000 r
DCP r/w MOS r/w SO r | DICOM r
DCR r MOV r SR2 r | Flash r
DIVX r MP3 r SRF r | FlashPix r
DJVU r MP4 r SVG r | QuickTime r
DLL r MPC r SWF r | GeoTIFF r
DNG r/w MPG r THM r/w | PrintIM r
DOC r MRW r/w TIFF r/w | ID3 r
DYLIB r NEF r/w VRD r/w/c | Kodak Meta r
EPS r/w NRW r/w WAV r | Ricoh RMETA r
ERF r/w OGG r WDP r/w | Picture Info r
EXE r ORF r/w WMA r | Adobe APP14 r
EXIF r/w/c PBM r/w WMV r | APE r
FLAC r PDF r/w X3F r | Vorbis r
FLV r PEF r/w XLS r | SPIFF r
FPX r PGM r/w XMP r/w/c | DjVu r
GIF r/w PICT r ZIP r | (and more)
Note: If FILE is a directory name, then only file types with recog-
:
Copy link to clipboard
Copied
with a little playing around I managed to get Graphic Convert to write to the IPTC of an image file without opening. You just have to have finder knock back the creator type to "8BIM" so that they open nicely in Photoshop afterwards.
Copy link to clipboard
Copied
Sorry, I've been a bit swamped by 'real' work (i.e. creating artwork!) and unable to get much further. Thanks for all your responses. I'm going to have a play and decide between the exiftool and Graphic Converter routes. I'm still anxious that .eps files (and now I look again 90% of them are eps) don't seem to hold onto 'keywords' which is what we were planning to use. And ICPT seems to be on its way out...
Cheers to all, I may be back if and when the job goes live!
Copy link to clipboard
Copied
Keywords should be part of the Dublin Core namespace. If the app you used to create the eps files adds metadata the the file then exiftool should be able to read/write keywords. But it can't create metadata for that type of file. If keywords are really needed and exiftool doesn't help you can add them with Photoshop but that would require opening and resaving each file.
Copy link to clipboard
Copied
Wandering off the Adobe theme here, but... I think my biggest problem is that the images concerned are eps's. I can set the IPTC keywords within Photoshop, either manually or by a script. Unfortunately Graphic Converter seems unable to do this for an eps.
The following applescript did just what I wanted, and no need to open the file, but only when I pointed it at a JPEG:
set my_file to "UK-001-EGLAISHER:Users:emmaglaisher:Desktop:308367-0508N.jpg"
tell application "GraphicConverter"
set file iptc of my_file to {"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", " -1", "TV,Home Entertainment", "", ""}
end tell
Copy link to clipboard
Copied
I thought it was you emma. I had some very similar syntax to you and tested with a handful of files of several types and was convinced that it was working. However since you pointed out the .eps problem I appear to be getting the same result!!! The funny thing is if I than ask Graphic Converter to get the IPTC info after it returns the correct data strange indeed. I will have to some further digging. What was your intention with using keywords in the files?
If its for local searching have you tried using the spotlight comment field with an amphisand delimiter? If so you could try this its fun…
Just mark your file with some unusual First tag "XYZ" or something like that then sting your keywords like so "XYZ&Apples&Bananas&Pears
In spotlight type XYZ space Apple space Banana space Pears as you type each word your search closes down always the top hit if I could only work out how to get this working with the xserver I would use it much more.
Copy link to clipboard
Copied
Er... that was a giveaway wasn't it? Have we met before? Or do we work in same office??
Sunday night and I barely remember what the problem is... will get in gear tomorrow morning and pay proper attention!