- home :: github.com/sportdb/sport.db.ruby
- bugs :: github.com/sportdb/sport.db.ruby/issues
- gem :: rubygems.org/gems/sportdb
- rdoc :: rubydoc.info/gems/sportdb
- forum :: groups.google.com/group/opensport
The sportdb gem lets you load fixtures in plain text into your sports database (also includes schema & models for easy reuse)
SYNOPSIS
sportdb [global options] command [command options] [arguments...]
VERSION
1.8
GLOBAL OPTIONS
-d, --dbpath=PATH - Database path (default: .)
-n, --dbname=NAME - Database name (default: sport.db)
--verbose - (Debug) Show debug messages
--version - Show version
COMMANDS
create - Create DB schema
setup, s - Create DB schema 'n' load all world and sports data
update, up, u - Update all sports data
load, l - Load sports fixtures
logs - Show logs
props - Show props
pull - Pull (auto-update) event fixtures from upstream sources
serve, server - Start web service (HTTP JSON API)
stats - Show stats
test - (Debug) Test command suite
help - Shows a list of commands or help for one command
NAME
setup - Create DB schema 'n' load all world and sports data
SYNOPSIS
sportdb [global options] setup [command options] NAME
COMMAND OPTIONS
-i, --include=PATH - Sports data path (default: .)
--worldinclude=PATH - World data path (default: none)
EXAMPLES
sportdb setup --include ./at-austria --worldinclude ./world.db
sportdb setup 2013_14 --include ./at-austria --worldinclude ./world.db
NAME
update - Update all sports data
SYNOPSIS
sportdb [global options] update [command options] NAME
COMMAND OPTIONS
--delete - Delete all sports data records
-i, --include=PATH - Sports data path (default: .)
EXAMPLES
sportdb update --include ./at-austria
sportdb update --include ./at-austria --delete
sportdb update 2013_14 --include ./at-austria --delete
NAME
load - Load sports fixtures
SYNOPSIS
sportdb [global options] load [command options] NAME
COMMAND OPTIONS
--delete - Delete all sports data records
EXAMPLES
sportdb load --include ./at-austria 2013_14/bl
sportdb load --include ./at-austria 2013_14/bl 2013_14/cup
NAME
pull - Pull (auto-update) event fixtures from upstream sources
SYNOPSIS
sportdb [global options] pull
EXAMPLES
sportdb pull
NAME
serve - Start web service (HTTP JSON API)
SYNOPSIS
sportdb [global options] serve
EXAMPLES
sportdb serve
Try the built-in console script. In your interactive Ruby shell type:
>> require 'sportdb/console'
# => Welcome to sport.db, version 1.9.7 (world.db, version 1.9.3)!
This will try to connect to the sport.db SQLite database in your working folder.
To get started try some queries, for example:
>> Team.count
# => 157
>> t = Team.find_by_key( 'barcelona' )
# => ...
and so on.
Just install the gem:
$ gem install sportdb
football.db- free open public domain football (soccer) data for use in any (programming) languageformula1.db- free open public domain Formula 1/Formula One data for use in any (programming) languageski.db- free open public domain Ski Alpin/Alpine Ski data for use in any (programming) languageamerican-football.db- free open public domain American Football data for use in any (programming) language
The sportdb scripts are dedicated to the public domain.
Use it as you please with no restrictions whatsoever.
Send them along to the Open Sports & Friends Forum/Mailing List. Thanks!