You are here

9 posts / 0 new
Last post
Keyword based on Folder/Project/Album #1
Chris Gell's picture
by Chris Gell
March 11, 2012 - 12:04am

Hi,

I would like to keyword my photos in a given Folder/Project with the title of the folder/project (or otherwise have that information included in the EXIF data). Does anyone know a (semi-) automated way to do that in Aperture 3.

I have had a poke around and can't seem to see a way. While on the meta data tab, there is an un-editable “Project Path” field, but there seems no way to include that information in the EXIF data for an image.

cheers,

Chris

PhotoJoseph's picture
by PhotoJoseph
March 13, 2012 - 1:52am

Chris,

Nothing that’s built in but it may be possible through AppleScript. I’ll ask Morten to have a think about it.

@PhotoJoseph
— Have you signed up for the mailing list?

Morten Scheel's picture
by Morten Scheel
March 14, 2012 - 2:07am

Hi Chris,

Making a keyword with just the project name would be easy to do with an AppleScript. Not so with the folder name, I’m afraid.

What you see in “Project Path” in the metadata tab, is not available to AppleScript. It’s stored in Aperture’s own library database which is hidden from sight. I might be able to access it, provided I know the exact path to the Aperture library you’re using and the path to where you have sqlite3 installed on your system. However, the script would probably break when the next update arrives. Apple is under no obligation to ensure backwards compatibility when it comes to undocumented features such as this. If you’re technically minded and know your way around SQL queries, I can provide you with links and information on how to access it, but it’s not for everyone. To give you an idea, this is a query that returns the “Project Path” of IMG_1857:
select ZLIBRARYRELATIVEPATH from ZRKFOLDER where ZUUID=(select ZPROJECTUUID from ZRKFILE where Z_PK=(select ZORIGINALFILE from ZRKMASTER where Z_PK=(select ZMASTER from ZRKVERSION where ZUUID='IMG_1857')));

So… I’m silently hoping that you’ll be satisfied with just the project name :-D
Let us know.

GABRIEL SWEET's picture
by GABRIEL SWEET
June 26, 2012 - 3:08am

Hi Chris, I am looking for exactly the same script/plugin to help me keyword media according the the album name. Have you found anything yet? Im running Aperture 3.3 now.

Tim Doyle's picture
by Tim Doyle
June 26, 2012 - 4:05am

Morten - the Project Path information is available from Applescript, as follows:

tell application “Aperture”
set selected_items to (get selection)
if selected_items is {} then
error “Please select one or more images in Aperture.”
end if

repeat with z from 1 to the number of items in selected_items
set this_photo to item z of selected_items – This is the version’s uuid
set projectpath to the value of other tag “MasterLocation” of this_photo as rich text

– Do something with the projectpath here
display dialog “Found path ” & projectpath

end repeat
end tell

Tim Doyle's picture
by Tim Doyle
June 26, 2012 - 4:39am

The following Applescript will loop through all selected photos and add a keyword to each with the value of the Project Path field.

Note that I have not tested this for all scenarios, and I do not guarantee it will be completely safe, but I think it is.

tell application “Aperture”
set selected_items to (get selection)
if selected_items is {} then
error “Please select one or more images in Aperture.”
end if

repeat with z from 1 to the number of items in selected_items
set this_photo to item z of selected_items – This is the version’s uuid
set projectpath to the value of other tag “MasterLocation” of this_photo as rich text
tell this_photo to make new keyword with properties {name:projectpath}
end repeat
end tell

Colin Chisholm's picture
by Colin Chisholm
August 25, 2012 - 2:59pm

Thanks Tim … I am trying out that script now on a copy of my library:
any idea how long it takes to run?
I have a library of about 50,000 images and it is still running after about 5 or 6 hours (late 2011 MacBook Pro 2.5GHz core i7 w/ 16GB ram).

However for my one current selection it seems to show the added keyword, which is good!

Activity Monitor shows Applescript Editor as not responding, but I think it is just busy: it’s sent and rcvd. msg. counts are increasing.

Of course I know by the time anyone sees this post I’ll be done one way or another! :)

-Colin

Colin Chisholm's picture
by Colin Chisholm
August 25, 2012 - 3:01pm

As an aside, is there a way in Aperture to change the current active selection when you have multiple images selected? I haven’t figured out how to do this.
(Cmd+Right Arrow key works in LR grid view, doesn’t seem to work for Aperture.)
-Colin

PhotoJoseph's picture
by PhotoJoseph
August 26, 2012 - 2:23am

Colin,

For your selection question, I’m not sure I follow. You can always use the arrow keys to navigate images, even if more than one is selected. Shift-arrow will keep the current selection, and add to that. Can you describe exactly what you’re doing, what you’re expecting to happen, and what is or isn’t happening?

-Joseph

@PhotoJoseph
— Have you signed up for the mailing list?

You may login with either your assigned username or your e-mail address.
Passwords are case-sensitive - Forgot your password?
randomness