Good News About Retrosheet...
... and I'll give myself a bit of credit here, because it is due to my post and some email I shared with Dave Smith, the guy behind Retrosheet, that it happened.
I posted about the Retrosheet trouble -- and if you missed it, read the original post here -- on Saturday; due to a server change, they had to change URLs on all their boxscores and player pages.
This, of course, caused all their prior links to be broken. I wrote about this on our SB Nation email list, and I got Eric Simon, who writes the SB Nation Mets blog Amazin' Avenue, who knows some UNIX programming, in touch with Dave and they worked out a way to redirect old links to new links. I don't profess to understand how this works, but it does.
Anyway, that means if you have old Retrosheet boxscores bookmarked or linked anywhere, they will redirect to the new ones. Not only that, but it appears to work faster than the old ones.
At this time they haven't been able to do the player pages, but that might happen sometime in the future.
Good news, and thanks to Eric for helping out!
50 comments
|
0 recs |
Do you like this story?
Comments
I think...
I'm thinking about it...
sigh.
thread hijacking gets kind of old after a while.
Really?
well.....
baseball starts soon. that'll be a good thing for a lot of reasons.
Yeah...
I take them seriously
And it's Julie's damn fault about the Grace thread.
I believe...
I can't wait for baseball. I know as soon as they start, I will be checking yahoo for pictures everyday and just watch the slideshow and freak out because I'm looking at baseball players.
I agree
And for the record, that isn't me.
Let's be more accurate.
Frankly, I don't mind injecting some humor in some of the threads... but every single one?
The start of training camp should fix this problem.
Capt. Killjoy
Funny gal
How about either Mark or gravedigger (or some variance on that)
OK.
What's your middle name? I don't have a middle name, and sometimes I kind of wish I did.
Hey!
so you like this idea?
I'd be fine with it.
I should leave this up to Julie...
lol
Why do you say that?
so...
You still didn't share your middle name...
by sparkles721 on Feb 12, 2007 11:15 PM CST up reply actions
The problem is...
Don't believe that!
Player links
That's correct.
They're working on it.
that's true
The player redirects will take, as near as I can figure it, 27 rules. If they need help doing this, Al, you can point them here or have them contact me. It would require one rule to move Pkoufs101.htm to k/Pkoufs101.htm. This rule should be easily applicable to any player or manager. It would then require 26 rules to convert k/Pkoufs101.htm to K/Pkoufs101.htm (one for each letter of the alphabet), as I know of no good ways to use backreferences in mod_rewrite to convert lowercase to uppercase or vice-versa. There are some other alternatives available to them if they have shell access and/or direct control over the directory structure - use the first rule I suggest, and then have directories aliased from the lowercase to the existing uppercase directories, etc.
by false cognate on Feb 13, 2007 12:22 PM CST up reply actions
actually, two rules
RewriteMap uppercase int:toupper
RewriteRule ^boxesetc/(P{1}(a-z{1}).*) boxesetc/${uppercase:$2}/$1 [R=301, L]
by false cognate on Feb 13, 2007 1:17 PM CST up reply actions
I'll quit replying to myself
I'm not a regexp or mod_rewrite ninja, so the above rules may need to be tweaked a little bit in order to make them work, but I'm sure that I'm pretty close to the correct regexp if it doesn't work. The major things I'm not sure about: do I need to close the string with a $ delimiter, and do I need to escape the slashes with backslashes.
by false cognate on Feb 13, 2007 1:26 PM CST up reply actions
My head just exploded
Man,
I can explain the string if you're interested, but you'd probably be the only one here.
by false cognate on Feb 13, 2007 2:44 PM CST up reply actions
If that is something...
for the education
mod_rewrite is a very powerful plug in for the Apache webserver. It is consequently also very confusing and complicated.
The first line reads:
RewriteMap uppercase int:toupper
This defines a mapping function called 'uppercase' which uses Apache's internal uppercasing function. I didn't know this existed until I looked it up today. You could call the function whatever you wanted - "foobar" or "doodoohead" or whatever, but obviously it's easier if you name it something descriptive.
The second line reads:
RewriteRule ^boxesetc/(P{1}(a-z{1}).*) boxesetc/${uppercase:$2}/$1 [R=301, L]
This is where the magic happens. It defines a rule to be invoked if part of the URL matches the pattern ^.....*) which will then be substituted with boxesetc/$....$1
Pattern:
^ denotes start of a string.
boxesetc/ is included at the start of the string just for sanity's sake.
Then we group the remainder using parentheses. This will be recalled as a backreference in the substitution as $1.
P{1} means match a single capital P. All personal pages in old (and new) retrosheet URLs start with P, as far as I can tell.
Then we group the next character using parentheses to create backreference $2. We match a-z{1} meaning a single lowercase letter.
Then .* should match all remaining characters in the string.
Substitution:
boxesetc/ is again included since we included it before.
${uppercase:$2} returns the string created by feeding backreference $2 into the function 'uppercase'. In the case of the Sandy Koufax page (Pkoufs101.htm) this would feed the lowercase letter k into the 'uppercase' function and return capital K.
/ is the directory delimiter.
$1 returns backreference $1, or Pkoufs101.htm
Pretty complicated, huh?
by false cognate on Feb 13, 2007 3:09 PM CST up reply actions
That makes a great deal of sense!
Check your email.
bleargh
RewriteRule ^boxesetc/(P([a-z]).*) boxesetc/${uppercase:$2}/$1 [R=301, L]
For anyone who cares, I'm in contact with Dave over at retrosheet.org, we're going to try to make this work. I have a backup plan in case he can't get his webhost to modify a certain file. Hopefully we'll have this working soon.
by false cognate on Feb 13, 2007 9:50 PM CST up reply actions
Excellent.
Hope they can get this worked out! Keep me informed so I can post another update.

by 



















