summaryrefslogtreecommitdiff
path: root/pagehandler.py
diff options
context:
space:
mode:
Diffstat (limited to 'pagehandler.py')
-rwxr-xr-xpagehandler.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/pagehandler.py b/pagehandler.py
index 5a36110..04ca30f 100755
--- a/pagehandler.py
+++ b/pagehandler.py
@@ -104,6 +104,19 @@ class IndexCmd:
print "Content-Type: text/html\n\n"
print LetterTocTemplate(self.letter, self.toc)
+class MaintCmd:
+ def __init__(self, args):
+ if len(args) < 1 or not len(args[0]):
+ error("please provide a email address on which to index")
+ else:
+ self.db = PatchTrackerDB()
+ self.email = args[0]
+ self.toc = self.db.findCollection(email="%"+self.email+"%")
+
+ def output(self):
+ print "Content-Type: text/html\n\n"
+ print SearchResultsTemplate(self.email, self.toc)
+
class JumpCmd:
def __init__(self):
form = cgi.FieldStorage()
@@ -138,6 +151,8 @@ class CmdHandler:
self.cmd = IndexCmd(args[1:])
elif cmdarg == "jump":
self.cmd = JumpCmd()
+ elif cmdarg == "email":
+ self.cmd = MaintCmd(args[1:])
elif not len(cmdarg):
self.cmd = FrontPageCmd()
else: