This repository contains a pair of Go programs that can be used to crawler the WTC result website (http://wmh-wtc.com/) and extract the data into a SQLite database, which is easier to use for various things, amongs which statistics, etc.
This project is built using github.com/constabulary/gb
as the toolchain (an alternative to the go
tool).
go get github.com/constabulary/gb/...
git clone https://github.com/elwinar/wtc
cd wtc
gb vendor restore
gb build
The crawler is used to retrieve the data from the WTC website and writing the extracted data into a file.
Usage of crawler:
-out string
output file (default "-")
The cruncher takes the file generated by the crawler and deduce additional information to put in the output database.
Usage of bin/cruncher:
-in string
input file (default "-")
-out string
output file (default "out.sqlite")
Here is the schema of the output database.
create table team (
id integer primary key,
name varchar(50),
country varchar(50)
);
create table player (
id integer primary key,
name varchar(50),
faction varchar(50),
team_id integer
);
create table list (
id integer primary key,
caster varchar(50),
player_id integer
);
create table match (
id integer primary key,
round integer
);
create table game (
id integer primary key,
match_id integer
);
create table report (
id integer primary key,
game_id integer,
list_id integer,
won boolean
);
Contact me.