#!/usr/bin/python """Generate HTML calendars This module reads a text file containing event information and generates a calendar web page containing those event tags in each day in a nicely formatted table where each tag links to the event text listed under the calendar written by manny juan manny@jps.net 09/15/97 """ import sys from calend2 import * import cgi,string from calnames import * def go(): print "Content-type: text/html" # identify response as HTML print # end of headers print "
| %s' % (week_name[(0+begw)%7]) print ' | %s' % (week_name[(1+begw)%7]) print ' | %s' % (week_name[(2+begw)%7]) print ' | %s' % (week_name[(3+begw)%7]) print ' | %s' % (week_name[(4+begw)%7]) print ' | %s' % (week_name[(5+begw)%7]) print ' | %s' % (week_name[(6+begw)%7]) print ' | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0): print 'width=5>'+str(day), else: print '>', print ' | ' print ' | ||||||||||||
| ',
if(day>0):
for i in range(maxdd):
if i>count[day]-1:
print ' ' else: evn=evt[(day,i+1)] tag,event=evtstore[evn] # this will also be the listing sequence (and link) evseq=evseq+1 print ''+tag+' ' print ' ' print ' | '
print '|||||||||||||