I’ve written before about how much I like Amazon.ca, the Canadian arm of Amazon.com. Today they’ve blown my mind again.
On Sunday night I was finishing up the last couple of chapters of Long Way Round, a book by Ewan McGregor and Charley Boorman about a motorcycle trip around the world (it’s a very good read; they’re both entertaining writers, and they had an interesting adventure).
McGregor mentions a couple of times that the book Jupiter’s Travels was an inspiration for their trip. Being an afficianado of round-the-world travel tales, I decided to order a copy for myself. At 1:30 a.m. on Monday morning.
The book shipped on Monday. It arrived at my doorstep, via regular shipping, this morning. Just slightly more than a day after I placed the order.
Google Maps says it takes 18 hours to drive from Mississauga (where Amazon’s warehouse is) to Charlottetown. That leaves only about 15 hours for the “logistics” part of the transaction. That, to me, seems simply amazing. I can’t imagine how they would get the book to me any faster.
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.
I found that it’s relatively easy to login to Drupal from AppleScript by using cURL. I created a sample script to show how; grab DrupalFromAppleScript, load it into Script Editor, enter values for your username, password and Drupal URL, and you should be able to get it to login to your site.
This will only get you logged in of course — you’ll have to amplify the script to make it do anything useful (like uploading content, grabbing information, etc.)
NOTE: I’ve released an updated version of this script that uses AppleScript only.
Here’s a hack I threw together to allow me to post images from iPhoto into my Drupal image gallery. It’s a two-step process: first, there’s an AppleScript that grabs the photo information from iPhoto and puts it into a temporary file; this script then calls a PHP script that takes this information and uses cURL to do an automated login to my Drupal site and uploads the photo.
There are probably much more elegant ways of doing this, but this one has the advantage of being relatively simply and easy to modify.
Here’s what you’ll need to make this all work:
- The iPhotoToDrupal AppleScript. Save this, and then copy the text into Script Editor; set the photo_temp and php_script variables to appropriate locations on your local system, and then save the AppleScript in the Library:Scripts:iPhoto Scripts folder under home directory. Note the need for the TEC OSAX; grab and install this if you don’t have it already.
- The upload_photo_to_drupal.php PHP script. Save and uncompress this file, then move it to the location you specified with the php_script variable in the AppleScript. You should make the script executable with chmod +x upload_photo_to_drupal.php. Now edit the script and insert the proper values for your installation, including your website URL, your Drupal username and password, the location of the temporary file created (same as the photo_temp in the AppleScript) and a cookie file for cURL.
- 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.
Once you’ve got all of the above downloaded, installed, and configured, uploading a photo from iPhoto to Drupal is as simple as selecting a photo, and then selecting the iPhotoToDrupal script from the Script Menu:
Note that you’ll need to have at least an image “title” defined in iPhoto, as this is a required field in Drupal; an image description is optional.
Assuming everything is configured properly, you should find the selected photo uploaded to your Drupal image gallery a few seconds later.
I welcome comments on the code and the approach.
I use iPhoto to manage my photos with my iMac. I use Drupal as a content management system for several websites I maintain. Drupal has an “image gallery” function that I use a lot. I also use Gallery to maintain some online photo albums (like this one).
Gallery has a neat iPhotoToGallery plug-in that allows photos, with titles and comments, to be easily exported to an online gallery.
I’d like to have the same thing for Drupal, and it occurs to me that the easiest way to do this would be to create a Drupal module that implements the Gallery Remote Protocol; this would mean that all of the Gallery client-side tools could be used to maintain Drupal image galleries.
The CBC released a document called Enhancing Regional Connections: A Local/Regional Strategy on Wednesday. Possible developments on Prince Edward Island include:
- A new joint Radio-TV news bureau in Summerside is proposed for 2007-2008.
- On television, “all or part of expanded supper-hour newscast, weekday late-night newscast, weekend local newscast, weekday interstitials” are proposed for Charlottetown for 2007-2008.
- On the web, “expanded CBC.ca coverage, 2nd shift weekdays, weekend shift 9AM-5PM” is proposed for Charlottetown in 2005-2006.
- On radio, “seven days a week news” is proposed for Charlottetown for 2005-2006.
- News reporters will be “called upon to produce items for both Radio and TV.”
Nationally the new initiatives are forecast by the CBC to cost an additional $82.8 million per year by 2007-2008.
Not many places have a Prothonotary, but we have one here on PEI. Our Prothonotary is responsible for:
- Assessment of all costs, both party-party and solicitor-client costs;
- mediation of all small claims cases,
- garnishee hearings, and criminal show-cause hearings for Provincial Court,
- execution of conveyances, transfers or mortgages ordered by the Court,
- issuing subpoenas for inferior courts/tribunals,
- hearing all uncontested motions, applications and references.
Our Prothonotary is also “empowered by the Marriage Act to perform civil wedding ceremonies.” And this morning he was quoted by the CBC as saying the following about the possibility of being called upon to perform same-sex marriages:
“I’m not allowed to discriminate for any purposes in the performance of my job and I don’t see how the government could really allow me to discriminate. Because then why can’t other people discriminate in other rights issues. I could do it on the basis of race, I could do it on the basis of language.”
Rock on.
I am