(Python3) Creates an sqlite3 database from Xonotic's game server database.
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
6fe717a453 Added note about version of Xonotic tested with pirms 2 gadiem
modules Clean up - repo now contains only whats needed pirms 3 gadiem
queries Extended mranks to include best time and by which player. pirms 3 gadiem
.gitignore Added ignore file. pirms 3 gadiem
LICENSE Added license pirms 2 gadiem
README.md Added note about version of Xonotic tested with pirms 2 gadiem
main.py Added option to export into sql query file pirms 2 gadiem

README.md

xonotic-py-sqlite3-defrag2db

Creates an sqlite3 database from Xonotic game server databases (server.db) using Python3.

Requirements

Only Python3 and standard libraries.

Usages

Creating a Database File from server.db

python main.py [output.db] [server.db]

Creating an SQL Query File from server.db

python main.py -f [output.db] [server.db]

Database Info

The output database will contain three tables, Cts_times, Cts_ranks, and Id2Alias. These are based strictly on the game server’s database schema for details see queries/schema.sql.

Sample Queries

queries/ contains sample queries for the database.

  • queries/mleaderboard.sql, given a map name, retrieves rank, player public key, and time record.
  • queries/mplayers.sql, given a map name, retrieves rank, player public key, and player alias.
  • queries/mranks.sql, for all maps, retrieves map name, number of records, best time, and alias of player with the best time.
  • queries/rplayers.sql, given a player public key, retrieves alias, map name, and given player’s rank.

Tested With

  • Xonotic 0.8.1
  • Xonotic 0.8.2