Mercurial > hg > rlgallery-misc
annotate web/recent.cgi @ 25:dd72d2dd923f
Move the inprogress dirs into a single directory.
The inprogress dirs are now at /dgldir/inprogress/$GAME instead of
/dgldir/inprogress-$GAME. This is less cluttered and may be more
convenient for watching.
author | John "Elwin" Edwards |
---|---|
date | Sun, 20 Oct 2013 19:05:58 -0700 |
parents | 453278a81371 |
children | e8f3b7994d88 |
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 |
21
453278a81371
Add tablerecent() so recent.cgi will work as before.
John "Elwin" Edwards <elwin@sdf.org>
parents:
7
diff
changeset
|
6 import rlgalldb as rlgall |
7
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() |