iw6dgm / fide-rating

FIDE Rating database available through friendly APIs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FIDE Rating parser

Parse the standard XML full player rating list provided by FIDE and save data into a SQLite3 database.

Setup

Create a SQLite3 database fide.db and create player table by using:

CREATE TABLE IF NOT EXISTS player (
  fideid bigint not null primary key,
  name text, country char(3),
  sex char(1),
  title text,
  w_title text,
  o_title text,
  foa_title text,
  rating integer,
  games integer,
  k smallint,
  rapid_rating integer,
  rapid_games integer,
  rapid_k smallint,
  blitz_rating integer,
  blitz_games integer,
  blitz_k smallint,
  birthday integer,
  flag text
)

Download XML file from FIDE website and unpack it. File name should be players_list_xml_foa.xml. Download and install Go SQLite3 dependency as described in here. Compile the source code and run the executable with no parameters.

go build fideparser.go
./fideparser

Warning: The overall process is very time-consuming.

TODO

  • FIDE Rating import: given a players list XML file from FIDE website, import it
  • FIDE Rating API: Web app to provide friendly APIs to query the FIDE dabatase created by the parser above

About

FIDE Rating database available through friendly APIs


Languages

Language:Go 100.0%