Sunday, December 10, 2006

Snowday SMS

School closing information is time-critical. Knowing you don't have to go to school today five minutes before the rest of the mob can give you great satisfaction - Wouldn't it be nice to get a text message as soon as the closing/delay information becomes available? Then you can sit at home, relax, and enjoy the fresh morning snow...


Unfortunately we have had next to no snow recently, so the blizzard photo is courtesy of Richard Harvey (a sweet image of Snow covered A6024 Woodhead Road, into Holme Village, Yorkshire, England in the Winter of 1978).

Back when we did get snow on the east coast, ciphercast and I hacked together this automatic snowday text-message daemon, written in bash (UNIX shell script). It was my first attempt at web parsing and at automatic SMS sending. I realize now that this could be done in python much easier/better but this script may be of interest anyway.

The script runs on a Linux (or Cygwin/Windows) PC that is allways on and connected to the internet (a server), and repeatedly checks the school district website for the text "schools closed" and if/when it is seen, it sends a text message to each of a list of Verizon cellphone numbers by emailing @vtext.com. You don't even need to open the message as the first few characters give it away: School Closed!

A nice extension to this would be to send to any phone number... maybe the script could detect what phone company owns the line, and select the appropriate method of sending the text message, as right now it only sends to Verizon customers.

Of course this can be adapted to report any kind of change of status in a web page. It is an example of the power of automated text messaging.

StumbleUpon Toolbar Stumble It!

1 Comments:

Anonymous Georg said...

Just a few years late I found this snow picture, thank you very much for it :). I used to run around Heidelberg, a city where snow is something rare, and make pictures in the few hours a kind of watery snow fell down. We still enjoy snow from time to time, even if temperatures are clearly rising in general, doubted only by lobbyists since a few years :(.

2:03 AM  

Post a Comment

Subscribe to Post Comments [Atom]

<< Home