2 Commits 1dd06edfcb ... c9819e7315

Author SHA1 Message Date
  scuti c9819e7315 merged branch 'speed-records', squashed 1 month ago
  scuti 1dd06edfcb merged branch 'speed-records', squashed 1 month ago
2 changed files with 15 additions and 10 deletions
  1. 1 1
      Makefile
  2. 14 9
      README.md

+ 1 - 1
Makefile

@@ -14,7 +14,7 @@ staticgen: colors.o src/dbquery.c
 colors4python:
 	gcc $(CFLAGS) src/colors.c -o colors -DCOLORS4PYTHON
 
-# build fro cgi 
+# build for cgi 
 cgi: main.o
 	gcc colors.o dbquery.o main.o -lsqlite3 -o $(BIN)
 

+ 14 - 9
README.md

@@ -8,34 +8,39 @@ A common gateway inferface (CGI) program written in C to display Race CTS leader
 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 static page generator. 
 
-`make staticgen` makes a static page generator.
+`make cgi` makes a CGI program.
 
 ## Usage: Import data from Xonotic
 
-This program uses an sqlite3 database file created from `~/.xonotic/data/data/server.db` (text). 
+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
 
-## Usage: CGI Query Strings
-The program queries the database `db/cts.db` (`./src/dbquery.c`, function `static bool executequery`)
+## Usage: (CGI) Queries
 
 * `(none)`
-    - Query file: `queries/mranks.sql`
-    - Requests the map list of the server and related data.
+    - file: `queries/mranks.sql`
+    - Requests the map list of the server, the best times scored per map and by which player.
+
+* `?fastest-players`
+    - file: `queries/fastest-players.sql`
+    - Requests the map list of the server, the highest velocities attained per map and by which player.
 
 * `?map=[map name]`
-    - Query file: `queries/mleaderboard-ojoin.sql`
+    - file: `queries/mleaderboard-ojoin.sql`
     - Requests the leaderboard of the map.
 
 * `?player=[clientid]`
-    - Query file: `queries/rplayers.sql`
+    - file: `queries/rplayers.sql`
     - Requests a player's ranks for all maps leaderboards s/he is present on.
 
+`queries/fastest-player-of-map.sql` is used exclusively by the python script `scripts/allmaps.py`.
+
 ## Usage: Static Page Generation
 
     python scripts/allmaps.py