
It doesn't happen as often as one might expect, but every now and again I get bitten on the ass by the fact that most of my programming knowledge has been acquired on an as-I-go basis.
These are the same people who, having completely dismissed the notion that maybe it might be a good idea for us as a species to have an exit plan, will then drive off to fill up their 5 Mpg Canyonero so they can go to Costco and buy 15 gross of disposable diapers to take back to their shiny new 15,000 foot McMansion built on what used to be pristine farmland.
I've been lucky so far in that somebody else has already come up against the exact same needs that I have, and written a plugin to work around them. One of these days, though, I'm going to have to brush up on ::gulp:: Perl so I can write my own.
If you're doing any parsing on the 'image_date' field as grabbed by AppleScript, beware.I just noticed a strange thing about the iPhoto 2.0 date/time field - if you don't touch the date set by iPhoto on import, AppleScript will read the date in the format 'YYYY:MM:DD HH:MM:SS'.
If you go in and tweak the date manually, however, AppleScript reads the date in the format 'YYYY-MM-DD HH:MM:SS -XXXX' where XXXX is the GMT offset. (note the hyphens between Y/M/D, compared to the colons above.)
So, if you're doing any parsing on the 'image_date' field as grabbed by AppleScript, this will probably give you grief.
I just added about 70 photos to the site. These were all available on the site I began in September of 2001, and sort of disappeared sometime during the spring of 2002.
The earliest photo at the time of this writing was taken on 9/26/1999, an astonishing 4.25 years ago.
Having added the photos to Movable Type using the dates upon which they were taken, the archives now go all the way back to 9/1999, which is somewhat mind-blowing to me.
When I started spending the occasional Saturday or Sunday driving around Los Angeles and taking photos, I had vague aspirations of creating a site like the excellent Roadside Peek, but again and again the prospect of managing such a site statically was just too much of a downer for me to ever make a serious effort. By late 1999 I had come to the conclusion that managing content-oriented websites with static HTML pages was a losing proposition, but lacking PHP and database knowledge at the time I didn't know what to do about it.
So the photos accumulated... first on Zip disks and then on CD-ROMs. Some of the backlog made it onto my 2001 web site, but many, many more photos remain scattered across those old CD's.
Enter iPhoto - A great tool for organizing groups of photos, and Movable Type - a great tool for putting content online. Connectivity between the two is still lacking, but I feel like a solution is in sight, and it will probably involve some combination of AppleScript, ImageMagick and PHP. My holy grail is to manage photographs in iPhoto - import them, label them, add comments, and then run an automated process to take that information from iPhoto, resize the photos for web use, build Movable Type Entry and Excerpt HTML, and push it all to the webserver.
Eric Sigler's jaw-dropping iPhoto2Weblog plugin comes so close, but the current release doesn't quite give me the flexibility I want.
Nevertheless, this is exciting stuff that I couldn't have imagined getting my hands on when I got my Olympus digicam back in 1999. Who knows what this site will look like by the end of 2004?
The only catch is that the FileDateTime info in the headers was set to the date upon which I copied them to my desktop from whatever old CD-ROM I found them on, not the actual dates of the photos.
Having a satellite receiver on the roof instead of a TV antenna means that we don't get programming from any of the major networks... with very, very few exceptions that's no loss.
"The store's staff opened the machine and discovered it was not functioning because its working parts had been replaced with small potatoes. The bemused shop assistants gave the man a new computer free of charge."