I recently purchased an Eye-Fi Explore (http://www.eye.fi/products/explore/) wi-fi enabled SD card for my digital camera.
This product has some great features, including automatic upload of your pictures to your choice of one online photo sharing service selected from an impressive list of services. MobileMe is NOT one of the services offered, however. Another very cool thing the card does, though, is to send the pictures to your home computer and import them into iPhoto, where they will be waiting for you when you return home. So I decided to try using an applescript triggered with a mail rule (you can have the Eye Fi send you an email when your upload is complete) to get my photos automatically uploaded to MobileMe.
Here is what I’ve come up with so far:
1. Prepare iPhoto
a. Create an album called “Uploads” (call it whatever you like and adapt these instructions to your chosen album name)
b. add a photo to the new “Uploads” album (any photo will do)
c. from the “Share” menu, select “MobileMe” and publish your “Uploads” album.
d. Once the “Uploads” album appears under the MobileMe section in your sidebar, you can delete the plain “Uploads” album you created. Also, once the published album has finished uploading, you can at any time remove the sample photo you placed there.
2. Prepare Eye-Fi Manager
a. in Eye-Fi Manager Settings, you must enable Upload to Web and pick a service. It doesn’t matter which. Most are free or have a free version.
b. Next go to Settings > Notifications. Enable email notifications to your email address.
3. Create applescript
a. Launch Script Editor
b. Paste the code below into the script editor:
(*******************************
Eye-Fi to MobileMe Script created by Carl Varney (cvc1968.mac@me.com)
Please keep attribution if redistributed.
*******************************)
(*******************************
Eye-fi creates an album in iPhoto with the current day's date as its name.
So first step is to get today's date and parse it into the same format as the name Eye-Fi will assign to the album.
*******************************)
set m to month of (current date)
set d to day of (current date) as integer
-- add a leading "0" to single digit days
if d < 10 then
set d to ("0" & d) as string
end if
set y to year of (current date)
set theDate to (m & " " & d & ", " & y) as text
-- we now have set album name that script will look for
set theAlbum to theDate as string
tell application "iPhoto"
activate
-- we'll set a loop that will make 10 attempts
set i to 0
repeat
-- first check if an album with today's date as name exists
if exists theAlbum then
set thePhotos to select photos of album theAlbum
-- had to resort to gui scripting here to copy and paste photos from Eye Fi album to Uploads album
tell application "System Events"
keystroke "c" using command down
end tell
select album "Uploads"
tell application "System Events"
keystroke "v" using command down
end tell
exit repeat
-- this exits repeat after 10 unsuccessful attempts to find the album
else if i = 10 then
exit repeat
else
-- if the album isn't found, this will pause 10 sec and then look again
delay 10
set i to (i + 1)
end if
end repeat
end tell
c. Save as a script to some good location of your choice on your computer.
4. Prepare Apple Mail
a. Go to Preferences and select Rules.
b. Create a new rule. Call it whatever you like.
c. The rule should read as follows:
d. Click OK
Now when Eye fi sends you the email notifying you of a completed upload, the photos will be copied into the published Uploads album which iPhoto will update on MobileMe automatically. And if you add more photos the same day, its OK. An iPhoto album can’t contain duplicates so nothing that was already there during the copy and past process will appear again.
That’s it. It working for me so far. I’m going to keep working on it. I welcome any suggestions for making a more elegant solution. For example, I’d like to find an alternative to the gui scripting.
My next goal is to expand the applescript to export to multiple services (with Eye-fi you can only choose one). I am going to try using a variety of exporter plug ins, and/or the very useful Picturesync application (http://picturesync.net/). Final fallback would be to use each service’s “upload via email” option and mail the new pics there. Any suggestions for making this goal a reality?
Thanks
Model: various
Browser: Safari 523.15
Operating System: Mac OS X (10.5)