How do I love thee? Let me count the days.

Lnorigb’s been bugging me to give her a thing in her calendar that tells her what day number each of her projects is on, so that her blog entries can be accurate. I finally wrote up this crappy little python script to do it. Requires the icalendar python package (easy_install icalendar). I just set up a file like:

Towner
90
2009/11/18
2009/12/25
2010/01/01

Which tells my script to create an iCal event every day for 90 work days named “Towner, Day ##”, and don’t count Christmas or New Year’s day as work days.

Not shown is the bit at the end that uploads the resulting .ics file to a web server, which then allows Lnorigb to simply subscribe to it in iCal. So if I make any changes in the output, like skipped days, increasing or decreasing the total count, or just general improvements, her calendar will automatically reflect the changes.

This is isn’t the best code I ever wrote, but it gave me an excuse to put a syntax highlighting plugin on the blog. And it’s not like I’m expecting to have to do a lot of maintenance work on it. Of course now that I’ve said that, it’s obviously going to cause me grief for many years. Eventually I suppose it will need a full fledged scheduling application, complete with payment calculators for her workers based on facial recogonition of the posted pictures on her blog, auto-blog posting, twitter updates, a related facebook application, and RSS feed generators. All of the above will be driven by the nine million state version of the stupid little state machine parser at the top of the script.

Yeah, don’t write code you’re not willing to maintain.

(Code follows after the break.)

Read the rest of this entry »

 

Huatulco, Mexico

Just walking around town pictures.  This is one of my favorite stops.  There’s an actual town right at the pier where the ship is docked, not an hour’s bus ride away like so many stops.  And the town is nice and clean and beautiful.  It is a tourist town, but at least it’s right here!  Hurray!

IMG_2247.JPG

IMG_2252.JPG

IMG_2246.JPG

IMG_2245.JPG
 

Panama Canal Pics

photo.jpg

photo 2.jpg

photo 3.jpg
 

Columbia pictures

All from Tayrona National Park, a beachfront rainforest, about 45 minutes outside Santa Marta, Columbia.

IMG_1566.JPG

IMG_1564.JPG

IMG_1515.JPG

IMG_1514.JPG
 

Misc. Aruba Pictures

No-lemur edition.

IMG_1196.JPG
That one’s actually the sunset leaving Mayaguez, Puerto Rico.  Or was it the sea day the day after?  I forget.  It doesn’t matter.

IMG_1291.JPG

IMG_1290.JPG

IMG_1275.JPG

IMG_1227.JPG

IMG_1230.JPG
 

Panorama

From the beach at Half Moon Cay.  This is basically the whole island.
IMG_1046.JPG
 

The Sights

On the beach at Half Moon Cay

Sunset from the Crow’s Nest, leaving Half Moon Cay

On our porch today

IMG_1016.JPG

 

So Long, Suckers!

The Lemur Prepares for TravelI’m out of here, on a ship for almost the next three weeks.  I might be posting occasional updates over on lemurofshame.com, I brought the little bugger (see picture) with me.  It all depends how much shame I can find for him to get into.  And how much internet I can get.

Gadgets in the picture that I couldn’t leave home without: Kindle, iPhone battery pack, laptop, book light for use with Kindle, spare batteries for same, chargers (and the picture was taken with an iPhone of course!)  I was almost going to leave the laptop at home (or my mom’s house, where I am tonight for my flight from San Diego), but it’s coming after all just in case I get inspired to post things on the lemur’s blog.

Not pictured: Lnor’s SPARE gadget bag in my carry on because she ran out of room in her main gadget bag.  (I’m only being slightly unfair by counting cameras as gadgets.)

 

New Blog

As requested by lnor, we have another new blog.  It’s not for me or her though.  It’s for the garage door.  I guess I’ll put it on twitter next.

Screen shot 2009-12-10 at 7.51.44 PM

 

Updated Internet Tricks

IndigoControlPageAs seen previously, I’ve got our garage door on the internet.  Six months later, I finally hooked the sensor up, so now we can find out, from anywhere where there’s internet, whether our garage is open or not.  I’ve also added more lights, and put them on a schedule, so we get some key lights on at sunset, off at bedtime, and the turtle gets her own schedule.  All of the devices can be controlled from an iPhone or anything with a web browser too.

Over at the right is exactly what it looks like.  If the garage is open, it changes to a picture of our garage with the door open.

I think it’s awesome.  It’s also great for messing with four-year-old nephews.