If it won't be simple, it simply won't be. [Hire me, source code] by Miki Tebeka, CEO, 353Solutions

Thursday, October 12, 2006

"today"

When releasing a new version, I like to send an email that starts with:

Stupid version 0.1.2 is out, grab it from
ftp://stupid.com/pub/stupid-0.1.2.tar.bz2 before SOMETHING is over!

Where SOMETHING is an event happening at the time of the post. To find what events happen today, I use the following script (called "today"):

#!/usr/bin/env python
'''Launch wikipedia page for today'''

from time import strftime
import webbrowser

day = strftime("%d")
# Change 06 -> 6
if day.startswith("0"):
day = day[1]

url = "http://en.wikipedia.org/wiki/" + strftime("%B") + "_" + day
webbrowser.open(url)

No comments:

Blog Archive