rlgallery-misc/web/recent.cgi
John "Elwin" Edwards f272772dcb Change the Python module's name back to rlgall.
It is no longer an experimental variant.  Using a database as a backend
is a settled feature.
2014-01-02 13:09:48 -05:00

24 lines
673 B
Python
Executable file

#!/usr/bin/python3
# CGI script creating page of recent games
import sys
import time
import rlgall
# It is assumed that sys.stdout uses UTF-8 encoding. If this is not the case,
# configure the Web server to set the LC_CTYPE environment variable to a UTF-8
# locale.
# The required header
sys.stdout.write("Content-Type: text/html; charset=utf-8\r\n\r\n")
# The top of the page
sys.stdout.write(rlgall.phead.format("Recent Games"))
sys.stdout.write(rlgall.ptop);
sys.stdout.write(rlgall.navtop.format("Recent"));
sys.stdout.write(rlgall.pti.format("Recent Expeditions"))
for game in rlgall.gamelist:
game.tablerecent(sys.stdout)
sys.stdout.write(rlgall.pend)
exit()