sportdb-import - tools 'n' scripts for importing sports (football) data in alternate (text) formats incl. comma-separated values (csv) format"
- home :: github.com/sportdb/sport.db
- bugs :: github.com/sportdb/sport.db/issues
- gem :: rubygems.org/gems/sportdb-text
- rdoc :: rubydoc.info/gems/sportdb-text
- forum :: opensport
Let's import all datafiles for all seasons (from 1888-89 to today) for England, use:
require 'sportdb/import' ## note: requires a local copy of the football.db clubs datasets ## see https://github.com/openfootball/clubs SportDb::Import.config.clubs_dir = './clubs' 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) ## note: requires a local copy of the football.csv england datasets ## see https://github.com/footballcsv/england pack = CsvMatchImporter.new( './england' ) pack.import_leagues
sportdb-import scripts are dedicated to the public domain.
Use it as you please with no restrictions whatsoever.
Send them along to the Open Sports & Friends Forum/Mailing List. Thanks!