Aperture AppleScript – Make Hierarchal Keywords Real v4
I believe that v4 should have resolved issues that some users were experiencing with v3 (http://brettgrossphotography.com/2008/03/04/aperture-applescript-make-keywords-real-v03) crashing Aperture.
Make Keywords Real
Current version: 04
Built on: Aperture 2.1 / Mac OS X 10.5.6
This AppleScript operates on the current selection.
This is an update to the previous update and should work properly now.
This AppleScript will make Aperture’s virtual keywords real.
“Huh?”
If you make hierarchal keywords in Aperture (you are, aren’t you), parent keywords are not exported with masters when exporting with XMP nor are they exported when exporting images as other formats. You can, however, use those keywords to find your images. Thus if you tag an image with ‘Bald Eagle’ in the following keyword hierarchy:
Animal
–> Wildlife
—-> Bird
——>Eagle
——–>Bald Eagle
You can find your image by searching for ‘Bird’, but when you export that same image the term ‘Bird’ is nowhere to be found.
FWIW, IMHO this is something that should have a checkbox in the Export panel.

This post has 5 comments
February 12th, 2009
Brett,
Thanks for posting this. I wanted to achieve the reverse as I have imported all my photos from the Linux app Digikam which, like Aperture, has hierarchical keywords (called tags) that it exports in the ITPC keywords field as a path – e.g. People/Friends/David – which I wanted to convert into Aperture hierarchical keywords. Your script gave me the necessary information about handling Aperture keywords to enable me to write my own script.
Thanks again.
Regards,
Mark
February 13th, 2009
I’m glad you found it helpful. One of the great things about AppleScript is that it is pretty easy to dissect others’ scripts to build your own.
August 3rd, 2009
This script will read the keyword hierarchy and assign all parent keywords to the image while it is in the Library. The keywords will be visible in the Aperture UI and present when images are exported.
I believe that this script does what you want.
I generally don’t recommend running the script until you have all of your keywords applied and are happy with your keyword hierarchy.
August 1st, 2009
Brett,
I have nearly 14,000 images in Aperture now, and am finally getting around to adding keywords. It’ll be painful, I know, but these Smart Albums are really really neat!! I like the virtual keywords when searching, but it’s confusing to only see the lowest-level keyword in the metadata inspector. VERY CONFUSING. I’m thinking your script here is the answer I’ve been searching for. THANKS!!
Just a couple of questions:
Does your script only help things out during export, or will it add the hierarchy of keywords within Aperture itself (so I see all keywords in the metadata inspector)? Or would this be even more confusing? Thanks for the script and for pointing me in the right direction!!
-Philip
February 11th, 2010
Nice work! Good even with 3.0.