Updated README
This commit is contained in:
parent
336352a335
commit
832e4b97a9
31
README.md
31
README.md
@ -1,14 +1,23 @@
|
||||
C CGI Xonotic DeFrag
|
||||
-----------------
|
||||
A CGI program written in C to display data related to Race CTS leaderboards of Xonotic servers.
|
||||
# xdfcgi
|
||||
|
||||
A common gateway inferface (CGI) program written in C to display data related to Race CTS leaderboards of Xonotic servers. It may also serve as a static page generator.
|
||||
|
||||
## Requirements
|
||||
* SQLite3
|
||||
sqlite-devel python3 python-sqlite
|
||||
|
||||
The first is only needed for compilation of the C program. The latter two are only for the auxiliary script `allmaps.py`.
|
||||
|
||||
## Compiling
|
||||
`make` makes a cgi program.
|
||||
|
||||
`make staticgen` makes a static page generator.
|
||||
|
||||
## CGI Query Strings
|
||||
The program queries the database `db/cts.db` (`./src/dbquery.c`, function `static bool executequery`)
|
||||
|
||||
## Web Server Queries
|
||||
* `(none)`
|
||||
- Query file: `queries/mranks.sql`
|
||||
- Requests the maplist of the server and related data.
|
||||
- Requests the map list of the server and related data.
|
||||
|
||||
* `?map=[map name]`
|
||||
- Query file: `queries/mleaderboard-ojoin.sql`
|
||||
@ -18,6 +27,16 @@ A CGI program written in C to display data related to Race CTS leaderboards of X
|
||||
- Query file: `queries/rplayers.sql`
|
||||
- Requests a player's ranks for all maps leaderboards s/he is present on.
|
||||
|
||||
## Static Page Generation
|
||||
The files `allmaps.py`, `output/leaderboard.css`, `template-generic.html`, `template_map-generic.html` are for static page generation. Before executing `allmaps.py`, copy and modify the templates.
|
||||
|
||||
cp ./template-generic.html ./template.html
|
||||
cp ./template_map-generic.html ./template_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/`.
|
||||
|
||||
python allmaps.py
|
||||
|
||||
## Game Versions Used Under:
|
||||
* Xonotic 0.8.1
|
||||
* Xonotic 0.8.2
|
||||
|
Loading…
Reference in New Issue
Block a user