![]() |
|
|||
Quote:
All the script does is check the website once a day, search for a string (the "no changes since [date]"), and if it sees a change, it sends me an email. It consumes considerably less bandwidth than actually visiting the site, as it doesn't download any of the graphics. It also doesn't make any money, and it keeps the umpires (like myself) who actually care about enforcing the non-approved bat rule as informed and up-to-date as possible. It basically works like this... 1 - It checks the website and puts the "no changes since [date]" into a little text file (THAT was a PITA to write, as the website uses JavaScript, and there's no way for you to go directly to the page that has the lists - I had to "curl" it and pass some -d flags to submit data, for you Unix geeks out there). 2 - It checks the new text file against the last text file it generated (when it previous found a change, or when it first ran). 3 - If there's a difference between the two files, it goes through another text file that contains email addresses (one address per line). 4 - If there's no difference between the two files, it simple deletes the new file, leaves the old file, and just exits. I should also note that the script was written on a Mac, so to run, it will need to be on a Unix-based machine (like an out-of-the-box Mac, just about any Linux flavor, and possibly on a Solaris box as well). My advice is to simply stick it into a crontab, set to run once a day.
__________________
Dave I haven't decided if I should call it from the dugout or the outfield. Apparently, both have really great views! Screw green, it ain't easy being blue! I won't be coming here that much anymore. I might check in now and again. |
Bookmarks |
|
|