Hello,
inspired by the datasette
{db,dbf,markdown,geojson,shapefile}-to-sqlite series [1] I have put
together the missing football-to-sqlite [2] tool that - surprise,
surprise - lets you load / read football.txt match datafiles
(e.g. English Premier League, German Bundesliga, Spanish La Liga
2020/21, etc.) into a sqlite database.
Usage:
Run this tool against match files in the Football.TXT format like so:
$ football-to-sqlite england.db 2020-21\1-premierleague.txt
or pass in more than one match file:
$ football-to-sqlite england.db 2020-21\1-premierleague.txt \
2020-21\2-championship.txt \
2020-21\3-league1.txt \
2020-21\4-league2.txt \
2020-21\5-nationalleague.txt
Note: If the single-file SQLite database (and its tables, views &
indices) do not (yet) exist, they get auto-created on the first run.
Note: You can use `football2sqlite` as an alias / alternate name.
Pipes & Standard Input (STDIN):
You can use any command line tool to download match files and pipe
(via stdin) into this tool like so:
$ curl https://raw.githubusercontent.com/openfootball/world-cup/master/2018--russia/cup.txt
> football-to-sqlite worldcup.db
That's it for now. Enjoy the beautiful game with ruby. Cheers. Prost.
[1] https://docs.datasette.io/en/stable/ecosystem.html
[2] https://github.com/sportdb/football.db/tree/master/football-to-sqlite
Thank you a lot ! I ve been looking for such cool programs. Great and clean
job.
···
Le dim. 18 oct. 2020 à 20:31, bungi bungi <bungimail@gmail.com> a écrit :
Thank you very much!
Sent from my iPhone
> On Oct 17, 2020, at 6:18 AM, Gerald Bauer <gerald.bauer@gmail.com> > wrote:
>
> Hello,
>
> inspired by the datasette
> {db,dbf,markdown,geojson,shapefile}-to-sqlite series [1] I have put
> together the missing football-to-sqlite [2] tool that - surprise,
> surprise - lets you load / read football.txt match datafiles
> (e.g. English Premier League, German Bundesliga, Spanish La Liga
> 2020/21, etc.) into a sqlite database.
>
> Usage:
>
> Run this tool against match files in the Football.TXT format like so:
>
> ```
> $ football-to-sqlite england.db 2020-21\1-premierleague.txt
> ```
>
> or pass in more than one match file:
>
> ```
> $ football-to-sqlite england.db 2020-21\1-premierleague.txt \
> 2020-21\2-championship.txt \
> 2020-21\3-league1.txt \
> 2020-21\4-league2.txt \
> 2020-21\5-nationalleague.txt
> ```
>
>
> Note: If the single-file SQLite database (and its tables, views &
> indices) do not (yet) exist, they get auto-created on the first run.
>
> Note: You can use `football2sqlite` as an alias / alternate name.
>
>
> Pipes & Standard Input (STDIN):
>
> You can use any command line tool to download match files and pipe
> (via stdin) into this tool like so:
>
> ```
> $ curl
https://raw.githubusercontent.com/openfootball/world-cup/master/2018--russia/cup.txt
> > football-to-sqlite worldcup.db
> ```
>
> That's it for now. Enjoy the beautiful game with ruby. Cheers. Prost.
>
>
> [1] The Datasette Ecosystem - Datasette documentation
> [2]
football.db/football-to-sqlite at master · sportdb/football.db · GitHub
>
> Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org
?subject=unsubscribe>
> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>
Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>