Tech Post #9: My (His) Alarm! & Other Stuff

The other night I got this idea that my Mac could wake me up in the morning. I had been getting into this awful pattern of staying up until 3-5am and waking up from 12-2pm. My CD-radio doesn’t quite work- it only plays the first track of any given CD, on alarm, and the radio reception in my apartment is crapola. KPFA screaming in my hear as total fuzz does not equate to happy peaceful morning time.

I search for, I kid you not, “Macbook alarm” and get – on the first hit back- this amazing blog post by this interesting guy– Konrad Lawson, a linguist/academic/technologist who authored a cool pinyin-to-unicode converter, and far more relevant to me but trivial to the world: he’s written an entire Automator sequence for doing exactly what I wanted. It does the following…

– gradually increases the volume
– selects first a song from a soft/soothing playlist of music (randomly chosen)
– updates and plays the daily NPR 5-minute summary podcast
– then plays, at louder volume, a fast-paced music playlist (randomly chosen)

I’m just peeing my pants with excitement. I am also eager to get hacking on the OS X BSD O/S. So I get to do some Applescript, which I haven’t done in AGES. Unfortunately everything is a little automatic and a little easy so no hacking or command line necessary, boo. Or yay, as my coding is so buggy (that’s why I moved on to databases! haha).

Some tiny little issues that I’ve already informed Konrad about:

1. iCal, which you need to use to trigger the script, has two date and time settings. The first is the time of the appointment/event, and the next is the time the script is run. I have no idea why they have two, and this is the reason that it didn’t run this morning. Made me super sad.

2. iTunes doesn’t have a command, at least one that Automator can create a process for, for figuring out when a song is done. Konrad scripted a loop that constantly checks for the status of iTunes to be “not playing” then setting a flag to true. I love AppleScript and how “English” it is. So if Apple figured out that one thing, there would be a lot less code in these script. And it seems like something that would be very useful for a variety of things.

Konrad posted a newer version that I will download and use- after I get a successful run of the first alarm. I’ve done a bad job testing it, so it’s not his fault.

New Scripts
So Mac has this thing called Automator that triggers applications, runs things automatically, stuff like that. So now I’m like, wow, it could start Firefox each morning, launch all of my tabs with my mailing lists, launch Adium, all that fun stuff. Can it make coffee and stir up some eggs?

Super Happy Dev House
In other geeky news, I’m heading down to SHDH tomorrow with cohort in crime Catherine of Ajax-teaching fame. I’m going to work on two projects: a plug-in for the haiku stuff off to the right there, and the cemetery map mash-up.

Haiku Plug-In: So far this is going to give you the ability to do a few things. First, perhaps RSS feeds for “latest submitted haiku”, “best rated haiku” and “newest release movie-haiku”. Then, I’d like folks to be able to host a form on their site for submission to the haiku database. I need to clean-up the interface of submitting a haiku quite a bit, but that is boring PHP work.

Cememtery Gmaps Mash-up: We all die, it’s true. Beyond facing mortality, though, my mom’s work at a cemetery would really improve if she had the ledger, which dates back to the mid-1800s, in a database that is accessible by mouseover of each plot, additionally with photos of each tombstone for the family. I do have an idea how this works but haven’t read the gmaps specifics.