1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Simple help Popup 
# GPLv3 or later (if it matters)

#!/usr/bin/python

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>" #I'm lazy!
    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()