Better iPhoto to Drupal via AppleScript

I’ve updated my system for uploading photos from iPhoto to a Drupal image gallery. The original script required both an AppleScript and a PHP script. The updated script does the same thing, but without the need for PHP; it also handles upload of multiple images at the same time.

To install the updated script, here’s what you need:

  • The updated iPhotoToDrupal AppleScript. Save this, and then copy the text into Script Editor; set username, password and other variables to appropriate locations on your local system (including the edit[taxonomy][], which is admitedly kludgey), and then save the AppleScript in the Library:Scripts:iPhoto Scripts folder under your home directory. You can rename it something useful like “Upload to Drupal” if you like.
  • As before, if you don’t have the Script Menu utility installed on your Mac, go and grab it; it lets you call the AppleScript from a pop-down menu in the menubar.

Assuming you’ve got everything configured properly, you should now be able to select one or more images in iPhoto, call the script (from the Script Menu under iPhoto Scripts) and the photos should appear shortly thereafter in the appropriate Drupal image gallery.

As always, comments and suggestions welcome.


mark's picture
mark on February 22, 2005 - 19:03 Permalink

I tried using your Drupal to iPhoto applescript but it didn’t work. no error and no activity at all.

I changed all the info you mentioned to change….did you set user name and password to your Drupal admin user and pwd or a site user name and password? i did the drupal admin user.

I didn’t do anything with taxonomy….I really haven’t grasped that whole concept so maybe that is my problem. I have only been usign Drupal for a few weeks.

david's picture
david on April 21, 2005 - 10:18 Permalink

Do you mean drupal image gallery as in an album in a “Gallery” ( embedded in drupal or the native drupal image gallery? I’m actually not sure there is a native drupal image gallery but so I’ve heard…

Marco's picture
Marco on August 6, 2006 - 08:09 Permalink


may you post a shell, perl or python version of the script? It would be great!


Benjamin Melan's picture
Benjamin Melan on December 12, 2007 - 15:01 Permalink

I receive an error about:

sh -c: line 1: unexpected EOF while looking for matching `”
sh -c: line 2: syntax error: unexpected end of file

from AppleScript, oddly independent of whether the login succeeds. In one attempt I did get the login rejected but otherwise just the above error no matter what.

I’m not familiar with AppleScript but I do program and spent a bit of time on this with no luck.

Any suggestions?