A Dashing widget to display your BART's next arrival time using real-time BART data from The Real BART API.
To use this widget, copy bart.coffee, bart.html, and bart.scss into the /widgets/bart directory of your Dashing app. This directory does not exist in new Dashing apps, so you may have to create it. Copy the bart.rb file into your /jobs folder, and include the XMLSimple gem in your Gemfile. Edit the bart.rb file to include your departure station code and direction. Your departure station code can be found by perusing the stations hash included in bart.rb. For example, I may enter phil for Pleasant Hill and S for Southbound where prompted in the bart.rb file.
To include the widget in a dashboard, add the following to your dashboard layout file:
#####dashboards/sample.erb
...
<li data-row="1" data-col="1" data-sizex="1" data-sizey="1">
<div data-id="bart" data-view="Bart"></div>
</li>
...- The XMLSimple gem
- Your BART station code (see Useage)
- The direction you're heading (Northbound or Southbound)

Nice, but there are multiple lines running from many stops, e.g. in the city, so a cardinal direction isn't enough to uniquely identify a train.