2013-12-31 13:36:19 -05:00
|
|
|
#!/usr/bin/python3
|
2012-08-19 21:29:06 -07:00
|
|
|
# CGI script creating page of recent games
|
|
|
|
|
|
|
|
|
|
import sys
|
|
|
|
|
import time
|
2014-01-02 13:09:48 -05:00
|
|
|
import rlgall
|
2012-08-19 21:29:06 -07:00
|
|
|
|
2013-12-31 13:36:19 -05:00
|
|
|
# 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.
|
|
|
|
|
|
2012-08-19 21:29:06 -07:00
|
|
|
# The required header
|
2013-12-31 13:36:19 -05:00
|
|
|
sys.stdout.write("Content-Type: text/html; charset=utf-8\r\n\r\n")
|
2012-08-19 21:29:06 -07:00
|
|
|
# The top of the page
|
|
|
|
|
sys.stdout.write(rlgall.phead.format("Recent Games"))
|
2022-08-03 20:49:38 -04:00
|
|
|
sys.stdout.write(rlgall.ptop)
|
|
|
|
|
sys.stdout.write(rlgall.navtop.format("Recent"))
|
2012-08-19 21:29:06 -07:00
|
|
|
sys.stdout.write(rlgall.pti.format("Recent Expeditions"))
|
|
|
|
|
|
|
|
|
|
for game in rlgall.gamelist:
|
|
|
|
|
game.tablerecent(sys.stdout)
|
|
|
|
|
|
|
|
|
|
sys.stdout.write(rlgall.pend)
|
|
|
|
|
exit()
|