Tuesday, March 24, 2009

Download Today's Sports

For years, The Sporting News was the bible of the Baseball world: complete records, weekly stats, team information, publishing yearly guides, rule books, etc. As a bonus, it would cover other sports as well, at least during baseball's off season.

Many of TSN's services have been replaced by such things as Retrosheet, the Emerald Guide, and, of course, the web sites of ESPN, Sports Illustrated, and even TSN's own site.

Trying to remain relevant while its popularity steadily declines, TSN has come out with Sporting News Today. If you are looking for investigative journalism, look elsewhere. SNT is a daily collection of articles, mostly from wire services, about what happened last night in sports. The four biggies (baseball, basketball, football and hockey), mostly, but other stories show up as well. At 40+ pages per day, it's the sports section your local paper never had, even when you had a local paper, and it had a sports section. For those of us far way from home, it's a godsend.

You can read SNT on the web, but I've found the best viewing is with the PDF download. This is predictably named, so I wrote a short script to pull it off the web, open it up with my favorite PDF viewer, and erase itself when I'm done. Feel free to modify this as and where you will. (With a few obvious modifications, it's excellent for looking at many daily comic strips.)

#! /usr/bin/perl

# Should download PDF version of Sporting News Today
# You probably should register first

# Make sure everything goes on in /tmp:

chdir "/tmp" ;

# Find the date

$daystring = `date +"%m %d %Y"`;


@date=split(" ",$daystring);

$m = $date[0];
$d = $date[1];
$y = $date[2];



# Get it:

system("wget $address");

# Read it, then erase it when you're done

system("xpdf /tmp/$name; rm /tmp/$name");