Website CGI (or page generator) to display Race CTS leaderboards of a Xonotic server.
scuti fd731108c7 narrowed paragraph selection in footer | 1 هفته پیش | |
---|---|---|
doc | 7 سال پیش | |
include | 1 ماه پیش | |
output | 1 هفته پیش | |
queries | 1 ماه پیش | |
scripts | 2 هفته پیش | |
src | 3 هفته پیش | |
templates | 1 ماه پیش | |
.gitignore | 3 هفته پیش | |
LICENSE | 7 سال پیش | |
Makefile | 1 ماه پیش | |
README.md | 3 هفته پیش |
A common gateway inferface (CGI) program written in C to display Race CTS leaderboards of Xonotic servers. It can also be a static page generator.
sqlite-devel python3 python-sqlite
make
makes a static page generator.
make cgi
makes a CGI program.
This program uses an sqlite3 database file created from ~/.xonotic/data/data/server.db
(text).
sqlite3 my-new.db
sqlite > .read schema.sql
python scripts/import-from-xon.py my-new.db ~/.xonotic/data/data/server.db
(none)
queries/mranks.sql
?fastest-players
queries/fastest-players.sql
?map=[map name]
queries/mleaderboard-ojoin.sql
?player=[clientid]
queries/rplayers.sql
queries/fastest-player-of-map.sql
is used exclusively by the python script scripts/allmaps.py
.
python scripts/allmaps.py
The files allmaps.py
, output/leaderboard.css
, overview.html
, map.html
produce the output.
Before executing allmaps.py
, copy and modify the templates.
cp templates/overview.html .
cp templates/map.html .
allmaps.py
outputs an html file for all distinct maps in the database. The leaderboards for each map (equivalent to ?map=[map name]
) are in output/maps/
.
The script scripts/import-from-xon.py
is based on https://git.teknik.io/antares/xonotic-py-sqlite3-defrag2db
by Antares.