The Official Forum

The Official Forum (https://forum.officiating.com/)
-   Softball (https://forum.officiating.com/softball/)
-   -   If ASA won't do it... (https://forum.officiating.com/softball/49089-if-asa-wont-do.html)

NCASAUmp Wed Sep 24, 2008 09:33pm

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!

NCASAUmp Wed Sep 24, 2008 10:52pm

Never mind the "before the weekend" statement. It's already done. :)

IRISHMAFIA Thu Sep 25, 2008 07:20am

Quote:

Originally Posted by NCASAUmp (Post 539149)
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!

I would like it, and did you ask ASA? If not, I will. They always love hearing from me.

NCASAUmp Thu Sep 25, 2008 07:40am

Quote:

Originally Posted by IRISHMAFIA (Post 539169)
I would like it, and did you ask ASA? If not, I will. They always love hearing from me.

I didn't ask ASA, because I initially started writing it for myself. Then I thought, "hey, wait... I know others on the forum have expressed interest in something like this, so why not open it up?"

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.

Skahtboi Thu Sep 25, 2008 08:46am

Quote:

Originally Posted by NCASAUmp (Post 539175)
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.

¡Mire! Puedo hablar otra lengua también. :D

NCASAUmp Thu Sep 25, 2008 09:14am

Quote:

Originally Posted by Skahtboi (Post 539190)
¡Mire! Puedo hablar otra lengua también. :D

¿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. :D

Skahtboi Thu Sep 25, 2008 11:03am

Quote:

Originally Posted by NCASAUmp (Post 539197)
¿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. :D

Yeah...but what about the one you were talking, the one in my last post about "solaris linux crontab" crap???

NCASAUmp Thu Sep 25, 2008 11:10am

Quote:

Originally Posted by Skahtboi (Post 539220)
Yeah...but what about the one you were talking, the one in my last post about "solaris linux crontab" crap???

Well, cron is a daemon that runs in the background on any Unix-base OS (such as Mac OS X, solaris, Linux, BSD, etc.), and all it does is kick off jobs that you set on a "crontab." The crontab says when exactly certain commands or scripts should be run, and on what schedule (such as "Every Monday, Wednesday and Friday at 12 PM").

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?"). ;)

CajunNewBlue Thu Sep 25, 2008 12:39pm

Quote:

Originally Posted by NCASAUmp (Post 539224)
Well, cron is a daemon that runs in the background on any Unix-base OS (such as Mac OS X, solaris, Linux, BSD, etc.), and all it does is kick off jobs that you set on a "crontab." The crontab says when exactly certain commands or scripts should be run, and on what schedule (such as "Every Monday, Wednesday and Friday at 12 PM").

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?"). ;)



lol and I thought i was a 'puter nerd.... Dude you rock!!:D

IRISHMAFIA Thu Sep 25, 2008 01:15pm

Quote:

Originally Posted by NCASAUmp (Post 539197)
¿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. :D

Hey, some of us live in the US, not Texas!

whiskers_ump Thu Sep 25, 2008 01:19pm

Quote:

Originally Posted by IRISHMAFIA (Post 539270)
Hey, some of us live in the US, not Texas!


Yeah, but those not living in Texas, really wish that they did?:D

NCASAUmp Thu Sep 25, 2008 01:19pm

Quote:

Originally Posted by IRISHMAFIA (Post 539270)
Hey, some of us live in the US, not Texas!

That's why I stuck in a little Scandinavian for yas. ;)

More specifically, Norwegian. Can't get much whiter than that, whitey. ;)

IRISHMAFIA Thu Sep 25, 2008 01:21pm

Quote:

Originally Posted by NCASAUmp (Post 539274)
More specifically, Norwegian. Can't get much whiter than that, whitey. ;)

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!

NCASAUmp Thu Sep 25, 2008 01:33pm

Quote:

Originally Posted by IRISHMAFIA (Post 539277)
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!

Ahhh... That must be how they do it in South Boston. ;)

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.

NCASAUmp Thu Sep 25, 2008 01:37pm

Quote:

Originally Posted by CajunNewBlue (Post 539250)
lol and I thought i was a 'puter nerd.... Dude you rock!!:D

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?" :D

JefferMC Thu Sep 25, 2008 01:44pm

Reminds me of when I fixed the hex values in the joke e-mail about the mysterious letters that appeared when you heated your Windows XP CD in the microwave. I made them actually have the ASCII codes for the letters that were supposedly there, since the author hadn't taken the time to get it right.

But converting binary to ASCII on-the-fly in one's head--Man, that IS geeky. I would only get through a few letters before my head hurt too much to retain the letters I'd already translated.

BTW, were the CR and the LF really necessary?

NCASAUmp Thu Sep 25, 2008 01:56pm

Quote:

Originally Posted by JefferMC (Post 539284)
Reminds me of when I fixed the hex values in the joke e-mail about the mysterious letters that appeared when you heated your Windows XP CD in the microwave. I made them actually have the ASCII codes for the letters that were supposedly there, since the author hadn't taken the time to get it right.

But converting binary to ASCII on-the-fly in one's head--Man, that IS geeky. I would only get through a few letters before my head hurt too much to retain the letters I'd already translated.

BTW, were the CR and the LF really necessary?

Cheater. ;)

IRISHMAFIA Tue Sep 30, 2008 09:59pm

Quote:

Originally Posted by IRISHMAFIA (Post 539169)
I would like it, and did you ask ASA? If not, I will.



Well, folks, I didn't think we would get a response so quickly, but here it is. This is the response I got from ASA concerning notification of a change in the bat lists and other changes:


Mike,

Thanks again for the suggestion.

Sending an E-Mail to all would be the best avenue, however, we do not have all the umpires addresses and the way that E-Mails change it would be difficult to keep up with that many changes.

To that end, here is what we will do to facilitate this information being sent out in a timely fashion. When a bat is added to the Non-Approved list, an E-Mail will be sent out to all council members, JO commissioners and all Local Association UIC's. This will happen as soon as the bat goes on the list. An announcement will also be posted on the front page of the Web Site at the same time.

Hopefully this will be able to get the word out in a quicker and more accurate manner.

NCASAUmp Tue Sep 30, 2008 10:35pm

That's great news, Mike, and I appreciate your efforts on this. It's a step in the right direction.

I've added everyone to the distribution list who asked to be included. If you guys later change your minds, just send me a PM or an email, and I'll make sure to delete it off the list.

I'm also talking with ASA about it, and we'll just see where it goes.

NCASAUmp Fri Oct 10, 2008 07:41am

I've made a few changes to how things will work on the automated list. Previously, I asked users to send a PM so I can manually add their email addresses to a list that was, well, just a small text file that the script goes through.

However, I know I can do it better! The server on which the script is running is a Mac OS X server with other cool features... like a listserv!

Being in IT myself, I'm always concerned about privacy and users' rights. Manually adding and deleting addresses from a list, to me, just doesn't provide people the "warm fuzzies" that if they choose to unsubscribe from the list, it will be handled in a timely manner. I may go out of town or out on vacation, and a removal request would sit there until I returned. However, a listserv can handle it for me, allowing the recipients to unsubscribe immediately at any time without my intervention.

I'm still working the kinks out and setting up all of the privacy settings, but I believe I've gotten them largely taken care of.

For those who wish to subscribe to the list, you may do so manually by going to http://mail.whispers.org/mailman/listinfo/batlist

From there, you can subscribe as well as unsubscribe. You may also unsubscribe by sending an email to the listserv with "unsubscribe" in the subject line.

For those of you who contacted me earlier wishing to be added to the notifications, I'll add you to the listserv, unless you have any objections or concerns. :)

If OKC wants something similar, I'll be happy to set this up for them as well for free (well, just buy the equipment, my plane ticket and put me up for a night). It's easy to set up, and it requires minimal intervention on their part. :)

NCASAUmp Fri Oct 10, 2008 07:48am

Oh btw... I also added, among others, Dutch language capabilities for those Dutch-speaking umpires who might wish to subscribe. ;)

No, seriously. I did. If there are any other language requests (Swedish, Japanese, Polish, Turkish, etc.), let me know. I'll do my best to accommodate you.

Welpe Fri Oct 10, 2008 11:09am

Dave you're a certified geek, and I admire that (that takes a lot for me to say that to a Mac guy!). :D

Thanks for the work you've done on this but I know you enjoyed doing it just as much. We IT folks are kind of strange that way. :)

NCASAUmp Fri Oct 10, 2008 11:31am

Quote:

Originally Posted by Welpe (Post 542447)
Dave you're a certified geek, and I admire that (that takes a lot for me to say that to a Mac guy!). :D

Thanks for the work you've done on this but I know you enjoyed doing it just as much. We IT folks are kind of strange that way. :)

Ain't that the truth!

bkbjones Fri Oct 10, 2008 06:25pm

Living here in the shadows of the construction cranes at Microsoft, I am confused. What is a Mac? Unix? These cryptic sounding "other languages?"

Just kidding. I know a guy in CA with a Mac.

And thanks for the batlist.

IRISHMAFIA Fri Oct 10, 2008 06:50pm

Quote:

Originally Posted by bkbjones (Post 542518)
Living here in the shadows of the construction cranes at Microsoft, I am confused. What is a Mac? Unix? These cryptic sounding "other languages?"

Just kidding. I know a guy in CA with a Mac.

You know Mac in CA? ;)

bkbjones Fri Oct 10, 2008 09:47pm

Quote:

Originally Posted by IRISHMAFIA (Post 542522)
You know Mac in CA? ;)

Not only do I know Mac, I also know his knife.

NCASAUmp Sun Nov 02, 2008 03:41pm

Looks like the ASA website is down, so my script won't work. Anyone know who to call to tell them they need to fix the server? :)

AtlUmpSteve Mon Nov 03, 2008 11:49am

Quote:

Originally Posted by NCASAUmp (Post 548064)
Looks like the ASA website is down, so my script won't work. Anyone know who to call to tell them they need to fix the server? :)

No one. It was planned maintenance, that voting members and others were given advance notice about.

NCASAUmp Mon Jan 19, 2009 01:16am

Well, I had a little incident with my server earlier. The hard drive started to fail on it (it's only 18 months old, damn it!), so I had to replace the drive. However, I believe I've gotten the automatic notifications back up and running.

If you've asked me to include you on the notifications, you should be back on the list. However, I had to do a little testing of the notification mechanism on my end, so if you got a notification a few minutes ago that the list has changed, please disregard. My apologies.

If anyone else wants to subscribe, feel free to let me know, or go to the site below. :)

http://softball.whispers.org/mailman/listinfo/batlist


All times are GMT -5. The time now is 04:17am.



Search Engine Friendly URLs by vBSEO 3.3.0 RC1