Monday, September 17, 2007

Updated script, plus some extra SQL

First, a script for crawling, umpires, and database updates in one shot - one day at a time.

You can easily re-modify it to do full crawls, take the parameters from the command line, whatever.

crawl-and-load.pl

You can use it at your own risk. To make it work, be sure to look carefully - I've even noted the lines of interest. Your data model may vary slightly, so don't run it unless you have a back-up and know what you're doing.

EDIT LINES:
month and day: lines 5 & 8
connection string: 291

REVIEW AND EDIT SQL:
351,360,381,389,403,412,426,435,446,479,489,542,554,562,587,605,648,660,668

Here's how I've gone about creating views (MYSQL 5+ required) for hitter strike zones and pitch spin.

create-hitter-zones.sql

create-spin-view.sql

Enjoy, share your feedback and improvements.


0 comments: