README/comment update.
This commit is contained in:
parent
832e4b97a9
commit
3850cf3032
12
README.md
12
README.md
@ -8,11 +8,11 @@ A common gateway inferface (CGI) program written in C to display data related to
|
||||
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` makes a CGI program.
|
||||
|
||||
`make staticgen` makes a static page generator.
|
||||
|
||||
## CGI Query Strings
|
||||
## Usage: CGI Query Strings
|
||||
The program queries the database `db/cts.db` (`./src/dbquery.c`, function `static bool executequery`)
|
||||
|
||||
* `(none)`
|
||||
@ -27,8 +27,10 @@ The program queries the database `db/cts.db` (`./src/dbquery.c`, function `stati
|
||||
- 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.
|
||||
## Usage: Static Page Generation
|
||||
The CGI program is still invoked in static generation. The files `allmaps.py`, `output/leaderboard.css`, `template.html`, `template_map.html` help produce the output.
|
||||
|
||||
Before executing `allmaps.py`, copy and modify the templates.
|
||||
|
||||
cp ./template-generic.html ./template.html
|
||||
cp ./template_map-generic.html ./template_map.html
|
||||
@ -42,8 +44,8 @@ The files `allmaps.py`, `output/leaderboard.css`, `template-generic.html`, `temp
|
||||
* Xonotic 0.8.2
|
||||
|
||||
## Compilers
|
||||
* gcc (GCC) 10.2.1
|
||||
* MinGW, GCC 4.7.1
|
||||
|
||||
__________________
|
||||
|
||||
This program uses an sqlite3 database file created from `~/.xonotic/data/data/server.db`.
|
||||
|
@ -31,7 +31,6 @@ def renderindex(template):
|
||||
pass
|
||||
|
||||
def main():
|
||||
# for each map generate an html file.
|
||||
template = ""
|
||||
with open("template.html", 'r') as fin:
|
||||
template = fin.read()
|
||||
@ -39,6 +38,7 @@ def main():
|
||||
maps = getmaps("db/cts.db")
|
||||
with open("template_map.html", 'r') as fin:
|
||||
template = fin.read()
|
||||
# for each map generate an html file.
|
||||
for game_map in maps:
|
||||
# game_map is a tuple obj.
|
||||
map_name = game_map[0]
|
||||
|
Loading…
Reference in New Issue
Block a user