Baseball Files
teams_xref
Teams Cross-Reference.
A grid of teams (rows & cols) showing results of team vs team.
classes:
gdTeamsXref - Main Stats Object
functions:
dispatch (cmd,[yr],[args]) - Module Command Dispatch
main (dts) - generate xref page for given dates
do_years () - generate single xref pages for all seasons
do_all () - generate combined xref page for all seasons
Developer@Sonnack.com
April 2012
function dispatch
Dispatch Command.
usage:
team_xref {command} {argument-list}
commands:
main - [yr] Generate Teams XRef page
AllYears - Generate Teams Xref for each Season (2007-2019)
AllSeasons - Generate Teams Xref for all Seasons (2007-2019)
function do_all
Generate one XREF object for All GameDay Seasons.
Writes single XREF TAB and HTML files for all known
GameDay seasons (2007-2019).
Returns XREF object.
function do_years
Generate Season XREF objects for All GameDay Seasons.
Writes the XREF TAB and HTML files for all known
GameDay seasons (2007-2019).
Returns list of XREF objects.
function main
Generate XREF object for given Date Range.
Writes the XREF TAB and HTML files for the date range provided.
Returns XREF object.
type gdTeamsXref
GameDay Teams Cross-Reference Class.
properties:
.now - Today's Date
.dt0 - first date
.dt1 - last date
.teams{} - dict of Team tuples
.grid{} - dict of Xref dicts
methods:
.write2file(fp) - write TAB-delimited file to 'fp'
.write2html(fp) - write HTML file to 'fp'
str(obj) - string: list of Teams
len(obj) - number of Teams
iter(obj) - get a Teams iterator
repr(obj) - JSON-like string