fperkins.com – Frank Perkins
Retro Gaming Image

Personal blog of Frank Perkins

Website from iPhoto using Applescript

Category: tech

For the past 5 years I have been manually uploading photos to a special section of the website to allow family members to see photos of the kids and stuff. Needless to say, this is very time consuming and I struggled using the most efficient means possible. I created a simple upload form and even have it setup so I can mail photos to the website that would post.

Since I purchased my iMac, all the photos are now in one convenient place, so wouldn’t be great if iPhoto could magically feed my website? Two issues are: 1) How do I transfer these 5, 7, 10 megapixel photos to a website 2) How do I get them out of iPhoto automatically with no manual intervention.

My solution is two fold. 1) Create an Applescript that will parse iPhoto, taking all the photos and creating web friendly versions of the files. The “large” image will be about 800×600 and then the associated thumbnail. 2) I didn’t want to have to transfer zillions of files to my website so I decided to host the images write off my iMac. I signed up for Optimum Boost which gives you a significant increase in upload bandwidth, and more importantly, legitimately allows you to host a home web server.

Since Applescript has hooks into Iphoto, it’s what I used to automate the ablum generation. Applescript is actually pretty easy to code in. The biggest issue I have with it is that it’s actually too easy. Some of the things are so simple to do, that I naturally try to find a more complex way. Conversely, some of the things you would expect to be able to do are almost impossible. You can download the script I use from here: Download Here

The script will create all the web friendly photos as well as the HTML to browse through all the images. I love it and I absolutely love that I know any images I import into iPhoto will automatically display on the website the next day.

No Comments, Comment or Ping

Reply to “Website from iPhoto using Applescript”