#!/usr/bin/python
import os, re
import time, stat
print "Content-Type: text/html\n\n"
print '''
Quaker Positions Available
Quaker Positions Available
'''
files = os.listdir(".")
for fn in files:
if not re.search(r'.html$', fn):
continue
if time.time() > os.stat(fn)[stat.ST_MTIME]:
continue
inf = open(fn)
while 1:
line = inf.readline()
if not line: break
titlematch = re.search(r'(.*)', line)
if titlematch:
title = titlematch.group(1)
break
inf.close()
print '- %s\n' % (fn, title)
modtime = time.ctime(os.stat(".")[stat.ST_MTIME])
print '''
Email position listings (with a closing date) to Russell Nelson
Last modified: %(modtime)s
''' % locals()