sport.db League Quick Starter Sample - Mauritius Premier League - Create Your Own Repo/League(s) from Scratch

35 views
Skip to first unread message

Gerald Bauer

unread,
Aug 27, 2015, 5:22:25 AM8/27/15
to open...@googlegroups.com
Hello,

I've put together a new sport.db (football.db) quick starter sample
using the Mauritius Premier League [1] to get you started creating
your own leagues/cups/etc. from scratch.

You can test drive the quick starter sample with a single command e.g.

$ sportdb build

To start from scratch follow these six steps:

- Step 1: Add all leagues
- Step 2: Add all clubs
- Step 3: Add all match fixtures and results
- Step 4: Add the league season "front matter" settings
- Step 5: Add a setups file list (also known as manifest)
- Step 6: Add a datafile build script - That's it. Done.

Using a file structure like:

├── 2014-15 # 2014-15 season folder
| ├── league-i.txt # match fixtures / results - matchdays 1-18
| ├── league-ii.txt # - matchdays 19-36
| └── league.yml # "front matter" settings
├── setups
| └── all.txt # file list (manifest)
├── leagues.txt # all leagues
├── clubs.txt # all clubs
└── Datafile # build script

That's it. Now try:

$ sqlite3 sport.db

>> SQLite version 3.7.16
>> Enter ".help" for instructions
>> Enter SQL statements terminated with a ";"

>> sqlite> select * from countries;
>> 1|Mauritius|mauritius|mu|1|MUS|||1261200|2040|||f|t|f|f|

>> sqlite> select * from teams;
>> 1|joachim|Cercle de Joachim||CDJ|Cercle de Joachim SC|Joachim|1||t|||||f|
>> 2|chamarel|Chamarel SC||CHA|Chamarel|Chamarel Sport Club|1||t|||||f|

and so on and so forth.
Cheers.

PS: As always make sure you have the latest (and greatest) library/gem
versions, for example, to support "in situ" local builds the latest
datafile (gem) version is required.

[1] github.com/sportkit/mu-mauritius

kaspi

unread,
Aug 31, 2015, 12:43:57 AM8/31/15
to opensport
I wish you wrote this a few days earlier :)
this guide should really be more visible, not just in news section!

Thanks for doing this Gerald!!

Gerald Bauer

unread,
Aug 31, 2015, 6:07:13 AM8/31/15
to open...@googlegroups.com
Hello,
Thanks for your kind words. Thanks for keeping going. You're -
as far as I know - the first in the world to have succeeded in
creating your own repo / league from scratch. Congratulations. Keep it
up. Cheers.
Reply all
Reply to author
Forward
0 new messages