Can't build my own football.db

281 views
Skip to first unread message

Football 365

unread,
Jan 8, 2016, 6:29:00 AM1/8/16
to opensport
Hi guys,
Recently, I finds football.db is amazing football database. I try to build my own database via https://github.com/openfootball/build. But I always faces message "Don't know how to build task 'worldcup'". I try to use https://github.com/openfootball/build-shell instead. It's seem everything ok. But my standing table is empty. How can I update my standing table data.
I really appriciate for your help. Thanks you.  

Gerald Bauer

unread,
Jan 8, 2016, 6:33:00 AM1/8/16
to open...@googlegroups.com
Hello,

Welcome to football.db. The best "recommended" and easiest way to
get started is using Datafiles [1].

You can build yourself a database using the Datafile for the
worldcup [2]. Example:

$ sportdb new worldcup # get world cup dataset

Will fetch zip archives from github and build the sport.db database. Cheers.

[1] github.com/openfootball/datafile
[2] github.com/openfootball/datafile/blob/master/worldcup.rb

Gerald Bauer

unread,
Jan 8, 2016, 6:42:00 AM1/8/16
to open...@googlegroups.com
Hello,

> But my standing table is empty. How can I update my standing table data.

To update the standings tables / data you will need to use a (build)
script (in Ruby). Example:

world_2014 = SportDb::Model::Event.find_by!( key: 'world.2014' )

st = SportDb::Model::EventStanding.create!( event: world_2014 )
st.recalc!

world_2014.groups.each do |g|
st = SportDb::Model::GroupStanding.create!( group: g )
st.recalc!
end


Cheers.

Football 365

unread,
Jan 8, 2016, 10:06:32 AM1/8/16
to opensport
Using datafiles to get my own database, I have result like this .


To update the standings tables / data you will need to use a (build) 
script (in Ruby).
How do I run this script? I don't know anything about ruby, I just wanna build this database to import to mysql server. Can you make an example for me? Thanks so much

Vào 18:42:00 UTC+7 Thứ Sáu, ngày 08 tháng 1 năm 2016, Gerald Bauer đã viết:

Gerald Bauer

unread,
Jan 8, 2016, 10:44:30 AM1/8/16
to open...@googlegroups.com
Hello,
How do I run this script? I don't know anything about ruby, I just wanna build this database to import to 
> mysql server. Can you make an example for me?   

  Sorry if you want to update the standing you have to learn (and use) a little Ruby. Cheers.

Reply all
Reply to author
Forward
0 new messages