You [Gerald Bauer¹] have been permanently banned [for life] from participating in r/ruby (because of your writing off / outside of r/ruby). I do not see your participation adding anything to this [ruby] community.

-- Richard Schneeman (r/ruby mod and fanatic illiberal ultra leftie on a cancel culture mission)

¹: I know. Who cares? Who is this Gerald Bauer anyway. A random nobody for sure. It just happens that I am the admin among other things of Planet Ruby.

Case Studies of Code of Conduct "Cancel Culture" Out-Of-Control Power Abuse - Ruby - A Call for Tolerance On Ruby-Talk Results In Ban On Reddit Ruby

Update (August, 2022) - A Call for More Tolerance And Call For No-Ban Policy Results In Ban On Ruby-Talk (With No Reason Given)

>  I just banned gerald.bauer@gmail.com.
>
>  -- SHIBATA Hiroshi
>
>> THANK YOU
>> 
>>  -- Ryan Davis
>>
>>
>> My full support to moderators.
>>
>> -- Xavier Noria
>> 
>> My full support to moderators.
>>
>>  -- Carlo E. Prelz
>>
>>  That's fun.
>>
>>  -- Alice

Read the full story »


« Ruby Football Week 2021, June 11th to June 17th - 7 Days of Ruby (Sports) Gems

Day 4 - football-to-sqlite Gem - Read the European Football Championship (“Euro”) 2020 Match Schedule in the Football.TXT Format Into euro.db Using the Shell / Command Line

Written by geraldb Gerald Bauer

What’s the football-to-sqlite gem?

The football-to-sqlite gem ships with the football-to-sqlite (or football2sqlite) command line tool that lets you read match files in the (structured) Football.TXT format into a single-file SQLite database.

Let’s try:

$ football-to-sqlite --help

resulting in

Usage: football-to-sqlite [options] DATABASE PATHS...

Yes, that’s it. Pass along the database name e.g. euro2020.db and one or more match files e.g. euro2020.txt and you’re done.

Euro 2020 - 24 National Teams, 6 Groups - June 11th to July 11th 2021

Let’s building up an SQLite database from scratch / zero for the European Football Championship (“Euro”) 2020 reading in the match schedule in the Football.TXT format.

Grab / download a copy from the open public domain football datasets org @ /euro/2020--europe/euro.txt of the match schedule to your own local computer. And run the command line tool against the match file:

$ football-to-sqlite euro2020.db euro.txt

Voila. That’s it. The euro2020.db single-file SQLite database is now populated with 24 national teams in 6 groups and 36 matches (in the group phase) and so on.

Note: The command line tool will “auto-magically” create the database with all tables, indices, etc. on the first run if the single-file database does not (yet) exist.

Bonus - Pipes & Standard Input (STDIN)

Yes, you can use any command line tool to download match files and pipe (via stdin) into the tool e.g.:

$ curl https://github.com/openfootball/euro/raw/master/2020--europe/euro.txt | football-to-sqlite euro2020.db

Limitations

Note: For now you CANNOT update match files, that is, if you try to add the same match twice (assuming with updated scores or such), the match reader will fail. The workaround is to always re-create/re-build your database from zero / scratch.

Find Out More

References

Questions? Comments?

Join us over on the r/PlanetRuby channel. Official home of the Best of Ruby Gems Series discussions. Thanks!

Built with Ruby (running Jekyll) on 2023-01-25 18:05:39 +0000 in 0.371 seconds.
Hosted on GitHub Pages. </> Source on GitHub. (0) Dedicated to the public domain.