Better iPhoto to Drupal via AppleScript

Peter Rukavina

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.

Comments

Submitted by mark on

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.

Submitted by david on

Permalink

Do you mean drupal image gallery as in an album in a “Gallery” (http://gallery.menalto.com/) 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…

Submitted by Benjamin Melan on

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?

Add new comment

Plain text

  • Allowed HTML tags: <b> <i> <em> <strong> <blockquote> <code> <ul> <ol> <li>
  • Lines and paragraphs break automatically.

About This Blog

Photo of Peter RukavinaI am . I am a writer, letterpress printer, and a curious person.

To learn more about me, read my /nowlook at my bio, listen to audio I’ve posted, read presentations and speeches I’ve written, or get in touch (peter@rukavina.net is the quickest way). 

You can subscribe to an RSS feed of posts, an RSS feed of comments, or a podcast RSS feed that just contains audio posts. You can also receive a daily digests of posts by email.

Search