From 7973d5537105a41265d5b0e8c546f4cbd70f1c6e Mon Sep 17 00:00:00 2001 From: def Date: Thu, 12 Apr 2018 23:27:32 +0200 Subject: [PATCH] TextQL instructions --- README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/README.md b/README.md index babf17be9..2ef28bdb8 100644 --- a/README.md +++ b/README.md @@ -126,3 +126,22 @@ $ cmake -DMYSQL=ON .. $ make $ ./DDNet-Server -f mine.cfg ``` + +Importing the official DDNet Database into SQLite using TextQL +-------------------------------------------------------------- + +```bash +$ wget https://ddnet.tw/stats/ddnet-stats.zip +$ unzip ddnet-stats +$ cd ddnet-stats +$ go get -u github.com/dinedal/textql/... +$ textql -console -header maps.csv race.csv teamrace.csv +sqlite> select sum(Points) from race join maps on race.Map = maps.Map where race.Name = "nameless tee"; +48849 +sqlite> .save ddnet.sqlite +sqlite> ^D +$ ls -lha ddnet.sqlite +-rw-r--r-- 1 deen deen 200M Apr 12 23:26 ddnet.sqlite +$ sqlite3 ddnet.sqlite +sqlite> +```