Mercurial > hg > rlgallery-misc
comparison web/archive.cgi @ 3:a943cfdfbad9
Remove obsolete code.
Remove some unnecessary module imports and code that worked with UNIX
timestamps.
| author | John "Elwin" Edwards <elwin@sdf.org> |
|---|---|
| date | Thu, 26 Jul 2012 09:35:07 -0700 |
| parents | 8f49df4074d7 |
| children | f5a37cc7f41f |
comparison
equal
deleted
inserted
replaced
| 2:8f49df4074d7 | 3:a943cfdfbad9 |
|---|---|
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 | 2 |
| 3 import cgi | 3 import cgi |
| 4 import os | 4 import os |
| 5 import sys | 5 import sys |
| 6 import re | |
| 7 import time | 6 import time |
| 8 import calendar | 7 import calendar |
| 9 from datetime import datetime | 8 from datetime import datetime |
| 10 import rlgalldb as rlgall | 9 import rlgalldb as rlgall |
| 11 import cgitb | 10 import cgitb |
| 15 infop = """<p>Looking for ttyrec files? Don't like digging through Web directory listings, converting time zones in your head, or guessing how many files | 14 infop = """<p>Looking for ttyrec files? Don't like digging through Web directory listings, converting time zones in your head, or guessing how many files |
| 16 the game was spread across? The Archivist can find them all for you.</p> | 15 the game was spread across? The Archivist can find them all for you.</p> |
| 17 """ | 16 """ |
| 18 | 17 |
| 19 ttyrecbase = "/var/dgl/dgldir/ttyrec/" | 18 ttyrecbase = "/var/dgl/dgldir/ttyrec/" |
| 20 recre = r"(\d{4,4})-(\d{2,2})-(\d{2,2})\.(\d{2,2}):(\d{2,2}):(\d{2,2})\.ttyrec" | |
| 21 recrec = re.compile(recre) | |
| 22 | 19 |
| 23 def input_game(outf, selected=None): | 20 def input_game(outf, selected=None): |
| 24 "Prints the form components for selecting a game." | 21 "Prints the form components for selecting a game." |
| 25 selstr = '<option label="{0}" value="{1}" selected="selected">{0}</option>\n' | 22 selstr = '<option label="{0}" value="{1}" selected="selected">{0}</option>\n' |
| 26 unselstr = '<option label="{0}" value="{1}">{0}</option>\n' | 23 unselstr = '<option label="{0}" value="{1}">{0}</option>\n' |
