[sf-lug] BART train departure info from the command line
Michael.Paoli at cal.berkeley.edu
Mon Feb 16 09:13:52 PST 2009
> Date: Sun, 8 Feb 2009 12:39:43 -0800
> From: John Magolske <b79net at gmail.com>
> At http://bart.gov/wireless/eta.aspx you can select a station from a
> pull-down list to check train departures. But I wanted a way to go
> straight to a given station by specifying it on the command-line. For
> example, `bart 16` or `bart sfo` to display real-time departures from
> the 16th/Mission or SF Airport stations respectively. I thought I'd
> pass it along here for any BART traveling command-line aficionados.
> The browser used (elinks) could be replaced with another. The other
> text-mode browser I'm familiar with is w3m, but it doesn't seem to do
> the auto-update of departure times. Something like Firefox would work,
> but I wanted everything to happen in one happy little tty.
> Kinda makes me want to jump on a train right now! Oh, wait...I do
> that Mon-Fri for work...hmmm, maybe better to just kick back & enjoy
> the rest of the weekend.
Hey, it can certainly be done in a single line of perl (for sufficiently
long line). Python will probably force one to use more than one
line however. ;-)
They've also got APIs - may be more useful to access them more directly.
More information about the sf-lug