sportdb-import gem - New football.db Match Importer for CSV Packages (incl. England, Deutschland, and More)

Gerald Bauer <[email protected]> Fri, 21 Jun 2019 08:17:09 +0200
Newsgroups gmane.comp.lang.ruby.general
Message-ID <CAAxEZd-GuRL_dAVvx_MVD1sb4vtXqkuL8JzGMhPbhk9HNNGDqA@mail.gmail.com>
Hello,

  I've added a new (quick) importer for datafiles and packages
in the comma-separated values (csv) format to the sportdb library /
tool family [1].

  For example let's import all datafiles for all seasons (from 1888-89 to today)
for England [2]:

   require 'sportdb/import'

   SportDb.connect( adapter:  'sqlite3',
                    database: './eng.db' )

    ## build database schema / tables
    SportDb.create_all

    ## turn on logging to console
    ActiveRecord::Base.logger = Logger.new(STDOUT)

    pack = CsvMatchImporter.new( './england' )
    pack.import_leagues


 Happy data wrangling with ruby. Cheers. Prost.

[1] https://github.com/sportdb/sport.db/tree/master/sportdb-import
[2] https://github.com/footballcsv/england

Unsubscribe: <mailto:[email protected]?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>