![]() |
If ASA won't do it...
I sure as hell will. Guys, I'm tired of trying to remind myself to check the non-approved bats list, so I'm writing a script that will do it for me automatically. If the list changes, it will email me once to notify me. I should have it done before the weekend.
If anyone else wants to get in on the notifications, feel free to PM me your email address. I won't give your email address out to anyone. If anyone wants the script itself, just let me know. :) Yeah, I'm a geek, and yes, it was a slow day at work today! |
Never mind the "before the weekend" statement. It's already done. :)
|
Quote:
|
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. |
Quote:
|
Quote:
Og jeg kan også snakke norsk. Jeg lærte det på universitetet i Wisconsin i Madison. :D |
Quote:
|
Quote:
So basically, I've set my web server at home (which happens to be a Mac server, as well as the server running the slow-pitch umpiring website I've mentioned before) to be the machine that periodically runs this script every day at noon. I'm going to have to modify the script a little to account for the fact that Time Warner probably wouldn't want me sending 20 emails of the same content to different recipients in under 5 seconds (spam? what's that?). ;) The script won't work on a Windows machine, as Windows doesn't use the same commands that Unix flavors do. It'd have about the same reaction to my script as Skahtboi did to my previous post (ie., "wtf?"). ;) |
Quote:
lol and I thought i was a 'puter nerd.... Dude you rock!!:D |
Quote:
|
Quote:
Yeah, but those not living in Texas, really wish that they did?:D |
Quote:
More specifically, Norwegian. Can't get much whiter than that, whitey. ;) |
Quote:
|
Quote:
Anyway, I started to post a link to the script on here, but decided that would be a bad idea. I think if anyone wants the script itself, just PM me. A bit safer that way, because I can see how ASA might get rubbed the wrong way if I just freely distribute it without any caution. |
Quote:
And by the way, it looked like this: 01001001 01100110 00100000 01111001 01101111 01110101 00100000 01100011 01100001 01101110 00100000 01110010 01100101 01100001 01100100 00100000 01110100 01101000 01101001 01110011 00101100 00100000 01111001 01101111 01110101 00100111 01110010 01100101 00100000 01100001 00100000 01100111 01100101 01100101 01101011 00001101 00001010 Wow. Although my joke at work is "why work when you can script?" :D |
All times are GMT -5. The time now is 08:27am. |