sportdb new <name> - football.db. Quick Starter Datafile Templates

93 views
Skip to first unread message

Gerald Bauer

unread,
Nov 26, 2014, 4:31:50 AM11/26/14
to open...@googlegroups.com
Hello,

FYI: I've uploaded a new sportdb command line tool version, that
is, v1.9.12. What's news?

The sportdb command line tool now includes a new quick starter
template command to (auto-)download Datafile scripts from the new
openfootball/datafile registry [1].

For example, to build yourself a copy of the worldcup2014.db type:

$ sportdb new worldcup2014

The new command will run these steps:

Step 1: Download worldcup2014.rb Datafile (from GitHub) to your
working folder as ./Datafile
Step 2: Run the sportdb build command
Step 2.a: Download all datasets listed in the Datafile as zip
archives (from GitHub) to ./tmp
Step 2.b: Create the "empty" database, that is, table structure,
indexes, etc. (schema)
Step 2.c: Read in all datasets from the zip archives in ./tmp (no
need to unpack)

That's it. All done and setup with a single command. Still early and
rough. If you try the new quick starter Datafile templates let us know
how it goes. Cheers.


[1] github.com/openfootball/datafile

Gerald Bauer

unread,
Nov 28, 2014, 5:57:33 AM11/28/14
to open...@googlegroups.com
Hello,

  FYI: I've added a couple of new quick starter Datafile templates:
  
  - worldcup    - All World Cups 1930-2014
  - en              - English Premier Leagues
  - en2014-15  - English Premier League 2014/15
  - cl2014-15   - (European) Champions League 2014/15
  
  Use like:
  
   sportdb new <name> e.g.
   
   sportdb new cl2014-15     and so on
   
  Cheers.

Joe Kampschmidt

unread,
Nov 29, 2014, 9:40:02 AM11/29/14
to open...@googlegroups.com
Thanks for the new tool. I've tried it out.

Might want to add this to the README:

gem update sportdb

after that I tried: sportdb new worldcup2014

but got the following error: 

-- create_table(:alltime_standings)
   -> 0.0009s
-- create_table(:alltime_standing_entries)
   -> 0.0011s
[info] parsing data (setup) 'setups/all' (/Users/joekampschmidt/.rvm/gems/ruby-2.1.0/gems/sportdb-1.9.14/data/setups/all.txt)...

*** error: undefined method `from_file' for FixtureReader:Class

Gerald Bauer

unread,
Nov 29, 2014, 11:56:25 AM11/29/14
to open...@googlegroups.com
Hello,

Thanks for trying. Sorry that's not working. That's weird. Looks
like a dependent library (gem) is not up-to-date, that is, textutils
(it includes the "new" FixtureReader with from_file 'n' from_zip
etc.).

Please try:

$ gem update textutils

Will check how the update for gem works - not really sure - if gem
update sportdb also updates all dependencies - and not sure - if gem
install sportdb might be a better alternative for an update. Will try
to find out more.

Cheers.
Reply all
Reply to author
Forward
0 new messages