diff jabberbot/commands.py @ 2694:6500951853e2

Make "get page info" work with data forms.
author Karol Nowak <grzywacz@sul.uni.lodz.pl>
date Fri, 17 Aug 2007 23:29:52 +0200
parents b0a44fc4d87d
children 9a3e85b44c25
line wrap: on
line diff
--- a/jabberbot/commands.py	Fri Aug 17 23:28:17 2007 +0200
+++ b/jabberbot/commands.py	Fri Aug 17 23:29:52 2007 +0200
@@ -83,14 +83,18 @@
     # Parameter list in a human-readable format
     parameter_list = u""
 
-    def __init__(self, jid):
+    def __init__(self, jid, presentation=u"text"):
         """A constructor
 
         @param jid: Jabber ID to send the reply to
+        @param presentation: how to display results; "text" or "dataforms"
         @type jid: unicode
+        @type presentation: unicode
+
         """
         self.jid = jid
         self.data = None
+        self.presentation = presentation
 
 class GetPage(BaseDataCommand):
 
@@ -123,8 +127,8 @@
     description = u"show detailed information about a page"
     parameter_list = u"pagename"
 
-    def __init__(self, jid, pagename):
-        BaseDataCommand.__init__(self, jid)
+    def __init__(self, jid, pagename, presentation=u"text"):
+        BaseDataCommand.__init__(self, jid, presentation)
         self.pagename = pagename
 
 class Search(BaseDataCommand):