Day One Calendar Logger

In the vein of Brett Terpstra's Git Logger for Day One, I've created a logger to add the previous days events to Day One. This helps me not only keep track of what happened after the fact, but keeps them in a "permanent" storage. The code is available in the following gist:

I put that in my cron with the following:

The sorts should cause it to be sorted by start/end time, but I can't confirm this 100% yet.