comparison 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
comparison
equal deleted inserted replaced
2693:dde1f1ee1d80 2694:6500951853e2
81 description = u"" 81 description = u""
82 82
83 # Parameter list in a human-readable format 83 # Parameter list in a human-readable format
84 parameter_list = u"" 84 parameter_list = u""
85 85
86 def __init__(self, jid): 86 def __init__(self, jid, presentation=u"text"):
87 """A constructor 87 """A constructor
88 88
89 @param jid: Jabber ID to send the reply to 89 @param jid: Jabber ID to send the reply to
90 @param presentation: how to display results; "text" or "dataforms"
90 @type jid: unicode 91 @type jid: unicode
92 @type presentation: unicode
93
91 """ 94 """
92 self.jid = jid 95 self.jid = jid
93 self.data = None 96 self.data = None
97 self.presentation = presentation
94 98
95 class GetPage(BaseDataCommand): 99 class GetPage(BaseDataCommand):
96 100
97 description = u"retrieve raw content of a named page" 101 description = u"retrieve raw content of a named page"
98 parameter_list = u"pagename" 102 parameter_list = u"pagename"
121 class GetPageInfo(BaseDataCommand): 125 class GetPageInfo(BaseDataCommand):
122 126
123 description = u"show detailed information about a page" 127 description = u"show detailed information about a page"
124 parameter_list = u"pagename" 128 parameter_list = u"pagename"
125 129
126 def __init__(self, jid, pagename): 130 def __init__(self, jid, pagename, presentation=u"text"):
127 BaseDataCommand.__init__(self, jid) 131 BaseDataCommand.__init__(self, jid, presentation)
128 self.pagename = pagename 132 self.pagename = pagename
129 133
130 class Search(BaseDataCommand): 134 class Search(BaseDataCommand):
131 135
132 description = u"perform a wiki search" 136 description = u"perform a wiki search"