(Python3) Creates an sqlite3 database from Xonotic's game server database.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 1.1KB

123456789101112131415161718192021222324252627
  1. # xonotic-py-sqlite3-defrag2db
  2. Creates an sqlite3 database from Xonotic game server databases (server.db) using Python3.
  3. ## Requirements
  4. Only Python3 and standard libraries.
  5. ## Usages
  6. ### Creating a Database File from server.db
  7. `python main.py [output.db] [server.db]`
  8. ### Creating an SQL Query File from server.db
  9. `python main.py -f [output.db] [server.db]`
  10. ## Database Info
  11. 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`.
  12. ### Sample Queries
  13. `queries/` contains sample queries for the database.
  14. * `queries/mleaderboard.sql`, given a map name, retrieves rank, player public key, and time record.
  15. * `queries/mplayers.sql`, given a map name, retrieves rank, player public key, and player alias.
  16. * `queries/mranks.sql`, for all maps, retrieves map name, number of records, best time, and alias of player with the best time.
  17. * `queries/rplayers.sql`, given a player public key, retrieves alias, map name, and given player's rank.
  18. ## Tested With
  19. * Xonotic 0.8.1
  20. * Xonotic 0.8.2