Mercurial > hg > rlgallery-misc
annotate web/recent.cgi @ 74:900da50ee11c
Merge lighttpd configuration into one include file.
The lighttpd configuration was previously spread across several files
which were intended to overwrite the defaults. They often became
outdated.
Now all customization is in lighttpd/rlgallery.conf, which should be
included at the end of whatever main lighttpd configuration file is in
use. It should require minimal updates for new lighttpd versions or
distribution changes.
author | John "Elwin" Edwards |
---|---|
date | Wed, 28 Dec 2016 13:12:04 -0500 |
parents | 25843238434a |
children | 44e8aaa20d02 |
rev | line source |
---|---|
30 | 1 #!/usr/bin/python3 |
7
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 |
33
25843238434a
Change the Python module's name back to rlgall.
John "Elwin" Edwards
parents:
30
diff
changeset
|
6 import rlgall |
7
64272fc2350c
Begin importing the website.
John "Elwin" Edwards <elwin@sdf.org>
parents:
diff
changeset
|
7 |
30 | 8 # It is assumed that sys.stdout uses UTF-8 encoding. If this is not the case, |
9 # configure the Web server to set the LC_CTYPE environment variable to a UTF-8 | |
10 # locale. | |
11 | |
7
64272fc2350c
Begin importing the website.
John "Elwin" Edwards <elwin@sdf.org>
parents:
diff
changeset
|
12 # The required header |
30 | 13 sys.stdout.write("Content-Type: text/html; charset=utf-8\r\n\r\n") |
7
64272fc2350c
Begin importing the website.
John "Elwin" Edwards <elwin@sdf.org>
parents:
diff
changeset
|
14 # The top of the page |
64272fc2350c
Begin importing the website.
John "Elwin" Edwards <elwin@sdf.org>
parents:
diff
changeset
|
15 sys.stdout.write(rlgall.phead.format("Recent Games")) |
64272fc2350c
Begin importing the website.
John "Elwin" Edwards <elwin@sdf.org>
parents:
diff
changeset
|
16 sys.stdout.write(rlgall.ptop); |
64272fc2350c
Begin importing the website.
John "Elwin" Edwards <elwin@sdf.org>
parents:
diff
changeset
|
17 sys.stdout.write(rlgall.navtop.format("Recent")); |
64272fc2350c
Begin importing the website.
John "Elwin" Edwards <elwin@sdf.org>
parents:
diff
changeset
|
18 sys.stdout.write(rlgall.pti.format("Recent Expeditions")) |
64272fc2350c
Begin importing the website.
John "Elwin" Edwards <elwin@sdf.org>
parents:
diff
changeset
|
19 |
64272fc2350c
Begin importing the website.
John "Elwin" Edwards <elwin@sdf.org>
parents:
diff
changeset
|
20 for game in rlgall.gamelist: |
64272fc2350c
Begin importing the website.
John "Elwin" Edwards <elwin@sdf.org>
parents:
diff
changeset
|
21 game.tablerecent(sys.stdout) |
64272fc2350c
Begin importing the website.
John "Elwin" Edwards <elwin@sdf.org>
parents:
diff
changeset
|
22 |
64272fc2350c
Begin importing the website.
John "Elwin" Edwards <elwin@sdf.org>
parents:
diff
changeset
|
23 sys.stdout.write(rlgall.pend) |
64272fc2350c
Begin importing the website.
John "Elwin" Edwards <elwin@sdf.org>
parents:
diff
changeset
|
24 exit() |