From 3850cf30324a1edff7815dc9dd054d1441e2d7a3 Mon Sep 17 00:00:00 2001 From: - <-> Date: Sun, 20 Feb 2022 07:00:01 -0800 Subject: [PATCH] README/comment update. --- README.md | 12 +++++++----- allmaps.py | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 36ff475..e906b8f 100644 --- a/README.md +++ b/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`. diff --git a/allmaps.py b/allmaps.py index 01d9e09..025c5fb 100644 --- a/allmaps.py +++ b/allmaps.py @@ -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]