Tuesday, September 2, 2008


Come on people. This is the age of Web 2.0. Your web pages should notify me if they update. I should be able to open my RSS reader and see the updated page. I can't always do this. Some pages that update frequently don't have RSS. Some are not built with RSS in mind. This prompted me to write PageWatch.

PageWatch is written in Perl. Here are its requirements:

  • Mac OS X

  • Growl

  • Perl Module LWP::UserAgent

  • Perl Module Mac::Growl

  • Perl Module Digest::MD5

  • Perl Module Mac::AppleScript

  • Edit line 11 to say your short name instead of mine.

It will download the URL you specify. A hash is made of the file it downloaded. This hash is looked up in the site hash table, which is stored in a hash file. If it is not found or does not match, Growl notifies you the page has been updated and it is opened in the default browser. If it hasn't been updated, nothing happens.

I didn't write this with distribution in mind and I won't distribute it beyond this post, so the username is coded in. Use Lingon to create a User Agent to run it at the interval you prefer for the site you want to check. It requires one argument; the full URL that you wish to check.

Click here to view and download the PageWatch source code. Don't forget to make the file executable or prepend the command line with "perl -w"

No comments: