|
|||
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!
__________________
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. |
|
|||
Never mind the "before the weekend" statement. It's already done.
__________________
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. |
|
|||
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.
__________________
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. |
|
|||
Quote:
__________________
Scott It's a small world, but I wouldn't want to have to paint it. |
|
|||
¿En serio? ¡Yo también! Pero creo que ya sabes que mi esposa es de argentina.
Og jeg kan også snakke norsk. Jeg lærte det på universitetet i Wisconsin i Madison.
__________________
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. |
|
|||
Yeah...but what about the one you were talking, the one in my last post about "solaris linux crontab" crap???
__________________
Scott It's a small world, but I wouldn't want to have to paint it. |
|
|||
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?").
__________________
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. |
|
|||
Quote:
lol and I thought i was a 'puter nerd.... Dude you rock!!
__________________
Will Rogers must not have ever officiated in Louisiana. |
|
|||
Hey, some of us live in the US, not Texas!
|
|
|||
Yeah, but those not living in Texas, really wish that they did?
__________________
glen _______________________________ "Twenty years from now you will be more disappointed by the things that you didn't do than by the ones you did do. So throw off the bowlines. Sail away from the safe harbor. Catch the trade winds in your sails. Explore. Dream. Discover." --Mark Twain. |
|
|||
That's why I stuck in a little Scandinavian for yas.
More specifically, Norwegian. Can't get much whiter than that, whitey.
__________________
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. |
|
|||
You've never seen my very white Irish-American sister. If she ever fell down in the snow, we wouldn't find her until the spring!
|
|
|||
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.
__________________
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. |
|
|||
There are plenty of guys/gals who are WAY beyond me when it comes to being a computer nerd. I once put "if you can read this, you're a geek" into an ASCII-to-binary translator, and wrote it on the white board at my old job. My old boss walked by, stood in front of it for a moment, then turned to me and said, "what's wrong with being a geek?"
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?"
__________________
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 |
|
|