Spotlight Comment to IPTC Field

Hi there,
maybe someone can help me.
i should say that i have absolutely no idea about apple script.
I want to create an automator plugin that takes the spotlight comments of a chosen photo and copies these to an iptc field.
I think the script here: http://discussions.apple.com/message.jspa?messageID=7203132#7203132 would be the right starting point but then there must be some command that uses GraphicConverter or something similar to write to iptc.
Looking forward to your answers, thx in advance
ben

'I want to create an automator plugin that takes the spotlight comments of a chosen photo and copies these to an iptc field. ' - which 'IPTC' field?
As per 'GraphicConverter's AppleScripts' Library's 'GraphicConverter.asdictionary' file - there are:
IPTC caption, IPTC captionwriter, IPTC headline, IPTC specialinstructions, IPTC byline, IPTC bylinetitlee, IPTC credit, IPTC source, IPTC objectname, IPTC datecreated, IPTC city, IPTC state, IPTC country, IPTC reference, IPTC category, IPTC copyright, IPTC urgency, IPTC subcategory, and IPTC keywords
Sample AppleScript code:
-- Code starts here --
on run
open (choose file with multiple selections allowed)
end run
on open (dItems)
repeat with i in dItems
tell application "Finder" to set fComment to comment of i
try
tell application "GraphicConverter"
open i
tell window 1
set IPTC caption to fComment
close saving yes
end tell
end tell
end
end repeat
end open
-- Code ends here --
Save the above code as an application (AppleScript applet). The applet can be double clicked on, or files to be processed - dragged onto it.
Or replace the contents of 'Automator's 'Automator' Library's 'Run AppleScript' Action with ...
-- Code starts here --
on run {input, parameters}
tell application "GraphicConverter" to activate
delay 1.0
repeat with i in input
tell application "Finder" to set fComment to comment of i
try
tell application "GraphicConverter"
open i
tell window 1
set IPTC caption to fComment
close saving yes
end tell
end tell
end
end repeat
return input
end run
-- Code ends here --
Save the above code as an 'Automator' 'Finder' Plug-in.
If any other IPTC parameter is to contain the file's comment entry, then replace 'IPTC caption' in ...
set IPTC caption to fComment
... with the desired IPTC parameter.
The code segments provided above - offers minimal error capturing. One is to assume that only files capable of being opened and (an IPTC parameter) modified by 'GraphicConverter' - are dragged onto the applet, or selected via the 'Automator' 'Finder' Plug-in's contextual menu.

Similar Messages

  • Transfer Spotlight Comments?

    Is there a way I can use Automator to transfer all of my photo archive's Spotlight Comments to IPTC or EXIF comment or description boxes?

    I guess not...

  • Automator for Exporting Spotlight Comments?

    Hello,
    I have around 700 historic photos that have been digitized. All the photo details (dates, etc.) were entered into the Spotlight Comments field under Get Info. Unfortunately, none of the comments appear when I open the photos in Adobe Bridge CS4. Is there an easy solution (perhaps an Automator script) to export the Spotlight Comments and use them elsewhere?
    Thank you,
    Brian

    Brian
    If I read you right, what you are trying to do is grab Finder metadata and convert it to photo metadata. Specifically, convert spotlight comments to Exif and IPTC - which is what a Photo app will need.
    You can't do this with Automator. The Automator dictionary has ways to set Spotlight Comments but I can see no way to get them. Further the dictionary has the ability to write to the IPTC data only of images in Aperture, not in the Finder or iPhoto.
    You might do better with that question on the Automator forum here:
    http://discussions.apple.com/forum.jspa?forumID=1261
    Have you tried the Applescript that was suggested when you posted the query last?
    As your target are file managed by Bridge, give the Adobe forums a go too.
    However, you may run into another issue here and that is that most scanners (as I presume this is how the photos were digitised) do not create Exif and IPTC data for scanned images. It may not be possible to do what you want to do.
    Regards
    TD

  • Importing Spotlight Comments

    Hi Everyone,
    I have around 700 historic photos that have been digitized. All the photo details (dates, etc.) were entered into the Spotlight Comments field under Get Info. Unfortunately, none of the comments appear when I open the photos in Adobe Bridge CS4. I will now start using Bridge to add the metadata tags.  However, is there an easy solution (perhaps an Automator script) to export the Spotlight Comments and use them in Bridge?  I really don't want to retype the information, and I would be extremely grateful for any advice.
    Thank you,
    Brian

    You most probably require the help of script to do this. Better to ask your Question in that forum. Your Spotlight Comments belong to Finder both AppleScript & Shell can get access to these not too sure about JavaScript. JavaScript would be required to add this info to the correct files.

  • Is it possible to export Spotlight Comments?  Please help.

    Hello,
    I have around 700 historic photos that have been digitized. All the photo details (dates, etc.) were entered into the Spotlight Comments field under Get Info. Unfortunately, none of the comments appear when I open the photos in Adobe Bridge CS4. Is there an easy solution to export the Spotlight Comments and use them elsewhere?
    Thank you,
    Brian

    I found this AppleScript on Google. I cannot vouch for it: I have never tried it and it is several years old. It appears to use GraphicConverter. But you can experiment with it, and see if it works for you.
    [http://forums.macosxhints.com/archive/index.php/t-76368.html]

  • How to copy a files name and spotlight comments to a text file for an entire folder

    I have movie covers saved as a jpeg for every movie my family and I own. There is about 700 and they each have a comment of the main actors, release dates, and descriptions. This makes it easy to find what to watch. I want my parents to have all of this info but they have a windows laptop so the comments don't transfer with the file and can't be searched like you can on a mac. Is there an applescript, automator, program I can download,  or program code supported in xcode that will do at least one of the following things?
    1)Take the name of the picture file and spotlight comment, copy and paste it into a text document like word that looks like this...
    File Name1- Spotlight Comment for file 1
    File Name 2- Spotlight Comment for file 2
    . for all 700 files in a folder
    2) It would be equally helpful if there was something that would take the name of the picture file and spotlight comment, copy and paste it to a movie file's comments with the same name but obviously has different extention. For an example
    In a Pictures folder
    Name: Dark Knight, The.jpeg       Comment: (2008) Genre: Action...             <- copy comment
    In a Movie Folder
    Name: Dark Knight, The.m4v       Comment:                                               <- paste 
    and do this for all 700 files
    3) Is there a free photo program that works on mac and windows that I can put all my movie pictures in and have a description like I did with the comments? It would also need a place that to search the description for keywords. So Basically an itunes for pictures that works on both mac and windows. If so I still need a way to get the spotlight comments to the description.
    4) I feel like this would make things more difficult, but if not I can put all of the .m4v files in itunes so instead of pasting all the comments back into a file in finder paste them in a description in itunes
    5) At the very least a code that I can run one by one for every file that will paste the comments into the same document
    Note: When I say spotlight comments I mean the comment box that is available when you click on get info of a file. The pictures are in the pictures section of finder in a folder called Movie Pictures. The movie files are on an external hard-drive in a file called Movies. Also I am slightly familiar with applescript and automater in that I have used both to create keyboard shortcuts and simple voice commands. I have programmed in c++ and C too. So If you give me a code for applescript I do know what to do with it.
    Thanks to anyone who takes the time to read all of this and extra thanks to anyone who tries to help.

    Clendenen02 wrote:
    2) It would be equally helpful if there was something that would take the name of the picture file and spotlight comment, copy and paste it to a movie file's comments with the same name but obviously has different extention. For an example
    In a Pictures folder
    Name: Dark Knight, The.jpeg       Comment: (2008) Genre: Action...             <- copy comment
    In a Movie Folder
    Name: Dark Knight, The.m4v       Comment:                                               <- paste 
    and do this for all 700 files
    This Bash script will do it.
    Edit "PicDir" and "MovDir" to the location of your Folders
    (Note: The comment is written to the m4v file using xattr, so the Spotlight comment field appears blank in Finder, but the comment metadata is still indexed by Spotlight (If you add a Spotlight comment from Finder, it is stored both as an extended attribute and in a .DS_Store file)
    #!/bin/bash
    PicDir=$HOME/Desktop/Pictures
    MovDir=$HOME/Desktop/Movies
    for f in $PicDir/*
    do
         if [ ! -d "$f" -a "${f##*.}" == "jpeg" ]; then
              comment=$(mdls -raw -name kMDItemFinderComment "$f")
              if [[ $comment != "(null)" ]]; then
                   picname=${f##*/}
                   movname=${picname%.*}.m4v
                   if [ -e "$MovDir"/$movname ]; then
                         xattr -w com.apple.metadata:kMDItemFinderComment "\"$comment\"" "$MovDir"/$movname
                   fi
              fi
         fi
    done

  • "Spotlight Comments" in Finder Get Info window doesn't accept Clipboard contents

    I wanted to paste caption and credit info from a NASA video download into the file's Spotlight Comments in the Get Info window. Done it in the past no problemo. Today it doesn't work.
    Tried pasting the copied web page content to TextEdit and converting to plain text, copy again, paste still a no-go. Tried typing in the Spotlight Comments window, that works ok. Looked at the contents of the Clipboard and the text appears there, labeled either as rtf or text depending on where the text was pasted from (web or TextEdit).
    Tried copying a couple of letters from the converted text, and they pasted ok into Spotlight Comments.
    Suggestions to make the Clipboard contents paste?
    Thanks.

    On further inspection, it appears that the contents of the old Comments field are carried forward into the Spotlight Comments field.

  • Can't add/edit Spotlight Comments in Apple default apps

    I can't add text to the Spotlight Comments field (via Get Info) in Apple's apps installed by default. The computer just beeps when I try to type something. However, I have no such problem with 3rd party apps.
    Is this a bug or is there something I have to do to allow Spotlight Comments?
    The permissions on all Apple apps installed by Snow Leopard are "system: "Read & Write," "wheel: Read only," and "everyone: Read only."
    Thanks.
    Message was edited by: Gunny Sack

    Someone else noted that and I tried a few and couldn't edit them, even after giving myself write permissions. It might be tied to some form of code signing/protection.

  • Raw Search Terms for "Spotlight Comment" and "Locked" Status

    Is it possible to do a raw search for a specific Spotlight Comment. I know the option exists in the Other… dialog box, but I need to find files that do not contain comments which is not choice.
    Also, is there any way to find only files that are unlocked?

    If you go to Others and select Raw Query you can use it find items with a specific comment, and items without any comment. For example, if you have the comment "testme" in the Spotlight field you would paste this into the Raw Query field:
    kMDItemFinderComment == "testme"
    and all files with that comment would be found. To find files in a folder that contain NO comment at all, you would use this:
    kMDItemFinderComment != "*"
    Be warned though: when I tried this on a folder with only 5 items in it, 4 with comments and one without. it worked, returning the lone uncommented file, but it took an amazingly long time to do so (perhaps a minute, while the search for "testme" was instantaneous).
    The "File readable" and "File writeable" functions shown in Others, which presumably are what one would use to find locked files, simply do not work. This is not surprising since the information about whether a file is locked or not does not in fact appear in a file's metadata. I guess that will be a future addition. You can use find in Terminal to search for files that are locked/unlocked. Let me know if you really want to do this.
    Francine
    Francine
    Schwieder

  • Need help modifying Applescript to copy "Spotlight Comments" into file

    Hello all,
    I have a very large batch of images of Leonardo da Vinci's notebooks. I used the "Spotlight Comments" field of each file to save information about the notebook page depicted in each image:
    Well, I had to modify each image in Photoshop and when I saved the files, Photoshop of course didn't retain the Spotlight Comments. Now, before I modified the images, I duplicated the directory, so I have a copy of all of the images that retain their Spotlight Comments field with each image's information. What I want to do is copy the text from the Spotlight Comments field of the original files and either paste this text into the Spotlight Comments field of the modified files (which are in a different directory, but retain the same filenames as the originals), or at least copy the text from the Spotlight Comments field of the original files and paste each block of text into a txt file with a couple of blank lines in between each entry, so that I can manually copy/paste the citations into the modified image's Spotlight Comments fields.
    I successfully used this Applescript:  https://discussions.apple.com/message/6741062#6741062
    to get the Spotlight Comments from the original files, but it displays them one by one in pop-up dialog boxes and because I have almost a thousand images it is extraordinarily wearisome to copy the text from each pop-up, paste it into a text file, make two blank lines, click "OK" in the pop-up to get the next one...
    Can anyone suggest how I can modify the code I have to tell the Finder to copy the contents of each pop-up and paste them into a single text file with a couple of blank lines between each entry?
    I have the barest, most rudimentary knowledge of Applescript, which is why I'm asking if one of the wizards here can help me modify or write an Applescript to do what I need to do.
    Thank you so much!
    BTW, here is the code from the aforementioned discussion that gets the Spotlight Comments from files. I made into an Applescript application using Automator:
    tell application "Finder"
    repeat with tItem in input
    set (comment of tItem) to (text returned) of (display dialog "Spotlight Comment: " default answer (comment of tItem as string))
    end repeat
    end tell

    Hi,
    Evan Izer wrote:
    Now, before I modified the images, I duplicated the directory, so I have a copy of all of the images that retain their Spotlight Comments field with each image's information. What I want to do is copy the text from the Spotlight Comments field of the original files and either paste this text into the Spotlight Comments field of the modified files (which are in a different directory, but retain the same filenames as the originals)
    This script does exactly that:
    set sFolder to (choose folder "Select folder wich contains original images.") as string
    set dFolder to choose folder "Select folder wich contains modified images."
    tell application "Finder"
          repeat with tItem in (get document files of dFolder)
                set origFile to sFolder & (get name of tItem)
                if file origFile exists then
                      set origComment to comment of file origFile
                      set comment of tItem to origComment
                end if
          end repeat
    end tell

  • How to Import Spotlight Comments into iPhoto

    Is there a way to import Spotlight Comments into iPhoto at the same time I bring in the image?

    Afraid not. You will need something to convert those comments into standard photo metadata like Exif or IPTC.
    Regards
    TD

  • Transferring spotlight comments to iPhoto

    I've got several hundered scanned photos on a hard drive with spotlight comments attached.
    Is there any way to transfer those spotlight comments into iPhoto's comment field when I import the files into iPhoto, or will I have to type them all in manually?
    If there isn't a way to do it through iPhoto, it seems like the kind of task that an Automator script could be written to handle, but I'm not very familiar with that.

    Chip:
    Unless you can find an Applescript that will do the job you'll probably have to enter them manually. Automator does not have any actions that I could find that could do the job. But then, I'm not overly proficient with Automator.
    You might ask in the Applescript forum.
    Do you Twango?

  • Collections in finder, quick add to spotlight comments

    I'm wanting to optimize the way I'm using spotlight, and know that there's a field for spotlight comments when you select and item in finder and command-i... I'm wondering if there's a keyboard shortcut that can let me add spotlight comments directly, or is there a Quicksilver plug-in that might let me do that?
    Also, within spotlight is there a way to configure it so that the first (or only) items to come up are the ones that I've added the relevant spotlight comments to?
    Basically what I'm wanting to do is to add the metadata that would effectively make collections like in Yojimbo or Notemind... I love Yojimbo's idea, but I don't want a separate database for all my yojimbo collections... I don't want to be bound to Yojimbo and don't want it always running in the background... the finder is already a fabulous database, and between QS and spotlight you can do a million more things than Yojimbo can let me do... so I would love to get this "collections" effect inside finder without making a million aliases for my files...
    Any suggestions?

    Let me start with the "easy" question first: the .DS_Store files are where "Finder information" is stored. Windows users find these things a pain in neck, and usually insist they be deleted. Most of time this isn't a problem, the Mac users just get annoyed when their folder doesn't open the way it was when last closed--the principle information stored there is the view the folder was told to keep, the size of the icons and their arrangement, and so on. Every time you open a folder a .DS_Store file created if one does not already exist, and if one does the file will be updated if you change your settings for the folder, for instance switch it to List view, tell it to always open in List view, with columns for Date Modified, Size, but not Kind or Date Created. And it also keeps the information entered in Spotlight Comments. Just how Finder preserves this information if a file is moved, in Mac OS, to another folder, I don't know. But it does.
    What we REALLY need is a nice little program to write to the metadata of the file. For instance, Spotlight will index keywords, which are stored in the file itself, as part of the file's metadata. I mainly work with graphics, and Photoshop allows you to add keywords to the file's metadata. Apple's iPhoto and Aperture will also add keywords, but they are not written to a file's metadata until you export them. PDFs can also have keywords assigned, you can even do it with Preview. Text documents can also have keywords added using some (most?) text editors, including TextEdit (provided the file is in RTF format). The nice thing about keyword metadata is that it goes with the file, and be accessed in any OS that allows a metadata search.
    Unfortunately I don't know of any program that would allow you to select a batch of miscellaneous files and add the same keyword to all of them. It would certainly be handy though.
    Francine
    Francine
    Schwieder

  • Spotlight Comments Disappear

    I have never been able to save spotlight comments. Never. Over years and years. I'm trying to organize some files by comment. The comment appears. Turn off the computer. Turn on, GONE. Does this function simply not work?

    I have had something similar happen. But, the data still seems to be there. I can't find the solution either.
    In Terminal.app, "mdls (FILE)" shows the comments in the kMDItemFinderComment field; and, Spotlight search still finds the files as well. Unfortunately, if you make any change to the comment block in Finder, the old data disappears and it is replaced with whatever you have typed.

  • Spotlight comments are missing?

    I added Spotlight comments to most of my documents to make them easier to locate. Easy enough, although it took some time.
    This morning I've found that those comments are missing. Of the several documents I checked, none had comments.
    The only thing I can think of is OnyX. I use OnyX to clean up my system periodically, and one of the options is the Spotlight Index.
    Is selecting the Spotlight Index killing my comments?

    One of the OnyX routines you ran killed them, but not Spotlight indexing. I almost never use the Spotlight comments field, because the content is not actually a part of the file. Instead the information is stored in a hidden Finder data file, and, as you've discovered, it is possible for this hidden data to get removed.
    Francine
    Francine
    Schwieder

Maybe you are looking for

  • Question About Internet

    Hi, Sorry if this has been answered before, I searched but couldn't find a clear answer. Anyway. I'm thinking of switching to a MacBook from PC's. Everyone else in my house uses a laptop or a PC and our internet is all based around one wireless route

  • Unable to install Subclipse on Mac OS X 10.7.3

    Unable to install Subclipse on Mac OS X 10.7.3/ Java version 1.6.0_29/ Subversion-1.6.17-1_10.5.x Hi, Don't know what's happening but when trying to install the package downloaded from http://www.open.collab.net/downloads/community/the package will n

  • Problem: installing Recommend Patch Cluster: patch 140900-10 fails

    I don't know if this is correct location for this thread (admin/moderator move as required). We have a number of Solaris x86 hosts (ie 4) and I'm trying to get the patched and up to date. I obtained the latest Recommended Patch Cluster (dated 28Sep20

  • Enhancement for Enjoy Reqs

    I'm looking for an enhancement (BADI or otherwise) that would allow me to add a custom button to the enjoy requisition transactions. Any help would be appreciated. Thanks! Heather

  • Aperture / iPhoto not recognizing CR2 Canon Raw anymore

    hello all, ive been using lightroom to manage my photos which are a CR2 Canon Raw from my Canon 5D Mark II. I recently decided to try out aperture and see if id like it better since i do use iPhoto to manage all of my simple little snapshots from my