Mercurial > hg > rlgallery-misc
annotate web/recent.cgi @ 7:64272fc2350c
Begin importing the website.
Add the files from the website's top-level directory. Note that
recent.cgi still uses the old rlgall module.
author | John "Elwin" Edwards <elwin@sdf.org> |
---|---|
date | Sun, 19 Aug 2012 21:29:06 -0700 |
parents | |
children | 453278a81371 |
rev | line source |
---|---|
7
64272fc2350c
Begin importing the website.
John "Elwin" Edwards <elwin@sdf.org>
parents:
diff
changeset
|
1 #!/usr/bin/python |
64272fc2350c
Begin importing the website.
John "Elwin" Edwards <elwin@sdf.org>
parents:
diff
changeset
|
2 # CGI script creating page of recent games |
64272fc2350c
Begin importing the website.
John "Elwin" Edwards <elwin@sdf.org>
parents:
diff
changeset
|
3 |
64272fc2350c
Begin importing the website.
John "Elwin" Edwards <elwin@sdf.org>
parents:
diff
changeset
|
4 import sys |
64272fc2350c
Begin importing the website.
John "Elwin" Edwards <elwin@sdf.org>
parents:
diff
changeset
|
5 import time |
64272fc2350c
Begin importing the website.
John "Elwin" Edwards <elwin@sdf.org>
parents:
diff
changeset
|
6 import rlgall |
64272fc2350c
Begin importing the website.
John "Elwin" Edwards <elwin@sdf.org>
parents:
diff
changeset
|
7 |
64272fc2350c
Begin importing the website.
John "Elwin" Edwards <elwin@sdf.org>
parents:
diff
changeset
|
8 # The required header |
64272fc2350c
Begin importing the website.
John "Elwin" Edwards <elwin@sdf.org>
parents:
diff
changeset
|
9 sys.stdout.write("Content-type: text/html\r\n\r\n") |
64272fc2350c
Begin importing the website.
John "Elwin" Edwards <elwin@sdf.org>
parents:
diff
changeset
|
10 # The top of the page |
64272fc2350c
Begin importing the website.
John "Elwin" Edwards <elwin@sdf.org>
parents:
diff
changeset
|
11 sys.stdout.write(rlgall.phead.format("Recent Games")) |
64272fc2350c
Begin importing the website.
John "Elwin" Edwards <elwin@sdf.org>
parents:
diff
changeset
|
12 sys.stdout.write(rlgall.ptop); |
64272fc2350c
Begin importing the website.
John "Elwin" Edwards <elwin@sdf.org>
parents:
diff
changeset
|
13 sys.stdout.write(rlgall.navtop.format("Recent")); |
64272fc2350c
Begin importing the website.
John "Elwin" Edwards <elwin@sdf.org>
parents:
diff
changeset
|
14 sys.stdout.write(rlgall.pti.format("Recent Expeditions")) |
64272fc2350c
Begin importing the website.
John "Elwin" Edwards <elwin@sdf.org>
parents:
diff
changeset
|
15 |
64272fc2350c
Begin importing the website.
John "Elwin" Edwards <elwin@sdf.org>
parents:
diff
changeset
|
16 for game in rlgall.gamelist: |
64272fc2350c
Begin importing the website.
John "Elwin" Edwards <elwin@sdf.org>
parents:
diff
changeset
|
17 game.tablerecent(sys.stdout) |
64272fc2350c
Begin importing the website.
John "Elwin" Edwards <elwin@sdf.org>
parents:
diff
changeset
|
18 |
64272fc2350c
Begin importing the website.
John "Elwin" Edwards <elwin@sdf.org>
parents:
diff
changeset
|
19 sys.stdout.write(rlgall.pend) |
64272fc2350c
Begin importing the website.
John "Elwin" Edwards <elwin@sdf.org>
parents:
diff
changeset
|
20 exit() |