13 Aug 2004 11:27

xmltv for the Olympics

xmltv is cool. Slow, but cool. Here's how I got the complete olympic lineup so I don't have to deal with the shoddy nbcolympics.com site:

# sign up for zap2it's data direct service, per the instructions in the
# tv_grab_na_dd man page. Then configure tv_grab_na_dd
tv_grab_na_dd --configure

# grab through the 30th
tv_grab_na_dd --days 17  > dd.xml

# do the magic incantation to get the guide
cat dd.xml | tv_sort | tv_extractinfo_en | tv_sort | tv_grep --on-after now > guide.xml

# now grep out the olympics
tv_grep -i 'olympic' guide.xml | tv_to_latex > oly.tex

# produce the pdf
latex oly.tex
dvipdf oly.dvi

Do it while you're eating breakfast or reading slashdot or something, it takes a lot of CPU and RAM, but it is something you can do in the morning before work, for example.

I made 1-up, 2-up, and 4-up versions. They are 12, 6, and 3 pages, respectively. Choose per your ocular prescription and paper conservation preference.

Ok, I guess I shouldn't say "complete", since apparently the listings are only through the 25th at this stage. I'll blog the last few days in plenty of time to plan your VCR/TiVo/attendance.