import cgi
print "Content-Type: text/html\n\n"
def show_example():
print "<HTML>\n"
print "<HEAD>\n"
print "\t<TITLE>Info Form</TITLE>\n"
print "</HEAD>\n"
print "<BODY BGCOLOR = white>\n"
print "<pre>"
print "Examples:<br>"
print "Show me what happened on July 31. (Fastest code, fastest search)"
print "Device: (blank)"
print "Month: 7"
print "Day: 31<br>"
print "Show me what happened to rtr-A on July 21-31:"
print "Device: rtr-A-l0"
print "Month: 7"
print "Day: [2-3][1-9]<br>"
print "Regular expression to search for any device on 10. any day in July:"
print "Device:10.*"
print "Month: 7"
print "Day: .*<br>"
print "</pre>"
print "BE CAREFUL! This is designed for short (< 1000 lines) outputs, not thousands! "
print "For instance, the last search will hang if you include checks/rancid. "
print "(Some idiot checking, but not 100% fool proof)<br><br>"
print "Programmed for Speed. (Search 100+ mb file) Could rewrite to be more exact, \
but it would be much slower.<br>"
print "</BODY>\n"
print "</HTML>\n"
def main():
show_example()
main()