No commit activity in last 3 years
No release in over 3 years
Extract data from the Carolina Roller Derby Scoreboard (http://sourceforge.net/projects/derbyscoreboard/) so it can be processed.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 1.9
>= 1.6.6.2
~> 10.0
 Project Readme

CrgScoreboardExtractor

Extract data from the Carolina Roller Derby Scoreboard so it can be processed.

Installation

Add this line to your application's Gemfile:

gem 'crg-scoreboard-extractor'

And then execute:

$ bundle

Or install it yourself as:

$ gem install crg-scoreboard-extractor

Usage

You can use the Watcher class to keep polling the xml file generated by the crg-scoreboard application:

CrgScoreboardExtractor::Watcher.new('path/to/scoreboard-0-now.xml').every(5) do |bout|
  bout.period.time
  bout.period.number
  bout.period.running

  bout.jam.time
  bout.jam.number
  bout.jam.running

  bout.team1.name # There's also a Bout#team2 method
  bout.team1.logo_path
  bout.team1.score
  bout.team1.lead_jammer
  bout.team1.positions # The list of skaters positions in the current jam
  bout.team1.jammer # A helper method to get the team's jammer in the current jam from the positions list

  position = bout.team1.positions.first
  position.type # Jammer, Pivot, Blocker1, Blocker2, etc.
  position.name
  position.number
end

You can also instantiate directly the Bout class:

CrgScoreboardExtractor::Bout.new(File.open('path/to/scoreboard-0-now.xml'))

Development

After checking out the repo, run bin/setup to install dependencies. Then, run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release to create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

  1. Fork it ( https://github.com/[my-github-username]/crg-scoreboard-extractor/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request