Merge lp:~stefanor/ibid/rename-feature-attr into lp:~ibid-core/ibid/old-trunk-1.6

Proposed by Stefano Rivera
Status: Merged
Approved by: Stefano Rivera
Approved revision: 920
Merged at revision: 921
Proposed branch: lp:~stefanor/ibid/rename-feature-attr
Merge into: lp:~ibid-core/ibid/old-trunk-1.6
Diff against target: 1289 lines (+127/-124)
41 files modified
docs/api/ibid.plugins.rst (+1/-1)
docs/tutorial.rst (+2/-2)
ibid/plugins/__init__.py (+2/-2)
ibid/plugins/admin.py (+8/-8)
ibid/plugins/ascii.py (+2/-2)
ibid/plugins/buildbot.py (+1/-1)
ibid/plugins/bzr.py (+1/-1)
ibid/plugins/calc.py (+3/-3)
ibid/plugins/codecontest.py (+1/-1)
ibid/plugins/conversions.py (+9/-6)
ibid/plugins/eval.py (+3/-3)
ibid/plugins/factoid.py (+6/-6)
ibid/plugins/feeds.py (+2/-2)
ibid/plugins/film.py (+2/-2)
ibid/plugins/fun.py (+4/-4)
ibid/plugins/games.py (+5/-5)
ibid/plugins/gameservers.py (+2/-2)
ibid/plugins/geography.py (+4/-4)
ibid/plugins/google.py (+2/-2)
ibid/plugins/help.py (+2/-2)
ibid/plugins/icecast.py (+1/-1)
ibid/plugins/identity.py (+8/-8)
ibid/plugins/karma.py (+3/-3)
ibid/plugins/languages.py (+2/-2)
ibid/plugins/lotto.py (+1/-1)
ibid/plugins/meetings.py (+3/-3)
ibid/plugins/memo.py (+4/-4)
ibid/plugins/memory.py (+2/-2)
ibid/plugins/network.py (+8/-8)
ibid/plugins/oeis.py (+1/-1)
ibid/plugins/quotes.py (+6/-6)
ibid/plugins/rfc.py (+1/-1)
ibid/plugins/seen.py (+2/-2)
ibid/plugins/social.py (+2/-2)
ibid/plugins/sources.py (+5/-5)
ibid/plugins/strings.py (+6/-6)
ibid/plugins/svn.py (+1/-1)
ibid/plugins/sysadmin.py (+4/-4)
ibid/plugins/test.py (+1/-1)
ibid/plugins/trac.py (+1/-1)
ibid/plugins/urlinfo.py (+3/-3)
To merge this branch: bzr merge lp:~stefanor/ibid/rename-feature-attr
Reviewer Review Type Date Requested Status
Keegan Carruthers-Smith Approve
Max Rabkin Approve
Michael Gorven Approve
Review via email: mp+22297@code.launchpad.net

Commit message

Rename Processor.feature -> features as we changed it to a list

Description of the change

This should have been done before 0.1.0

To post a comment you must log in.
920. By Stefano Rivera

Merge from trunk

Revision history for this message
Max Rabkin (max-rabkin) wrote :

Is this important enough to backport?

Revision history for this message
Stefano Rivera (stefanor) wrote :

No, it's an API change. For 2.x I think.

Revision history for this message
Michael Gorven (mgorven) wrote :

Looks fine.
 review approve

review: Approve
Revision history for this message
Max Rabkin (max-rabkin) wrote :

Oops, for some reason I thought you were proposing to merge this into 0.1.

review: Approve
Revision history for this message
Keegan Carruthers-Smith (keegan-csmith) wrote :

Looked for anything you may have missed out, couldn't find anything. Approve

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'docs/api/ibid.plugins.rst'
--- docs/api/ibid.plugins.rst 2010-03-02 20:37:03 +0000
+++ docs/api/ibid.plugins.rst 2010-03-27 17:38:22 +0000
@@ -31,7 +31,7 @@
3131
32 Default: ``None``32 Default: ``None``
3333
34 .. attribute:: feature34 .. attribute:: features
3535
36 List: Strings naming each feature that this Processor is part of.36 List: Strings naming each feature that this Processor is part of.
37 Used in locating "usage" strings for on-line documentation.37 Used in locating "usage" strings for on-line documentation.
3838
=== modified file 'docs/tutorial.rst'
--- docs/tutorial.rst 2010-03-02 20:51:25 +0000
+++ docs/tutorial.rst 2010-03-27 17:38:22 +0000
@@ -247,7 +247,7 @@
247 class Dice(Processor):247 class Dice(Processor):
248 usage = u'roll <number> dice'248 usage = u'roll <number> dice'
249249
250 feature = ('dice',)250 features = ('dice',)
251251
252 @match(r'^roll\s+(\d+)\s+dic?e$')252 @match(r'^roll\s+(\d+)\s+dic?e$')
253 def multithrow(self, event, number):253 def multithrow(self, event, number):
@@ -262,7 +262,7 @@
262and if necessary add a category to it from your module.262and if necessary add a category to it from your module.
263263
264The Processor can be linked to a feature by specifying it in the264The Processor can be linked to a feature by specifying it in the
265`feature` attribute.265`features` attribute.
266Usage for the Processor's functions (in BNF) goes in a `usage`266Usage for the Processor's functions (in BNF) goes in a `usage`
267attribute.267attribute.
268"reload tutorial" and you should see "dice" appear in the features for268"reload tutorial" and you should see "dice" appear in the features for
269269
=== modified file 'ibid/plugins/__init__.py'
--- ibid/plugins/__init__.py 2010-03-23 15:21:27 +0000
+++ ibid/plugins/__init__.py 2010-03-27 17:38:22 +0000
@@ -259,7 +259,7 @@
259 isLeaf = True259 isLeaf = True
260260
261 def __init__(self):261 def __init__(self):
262 ibid.rpc[self.feature[0]] = self262 ibid.rpc[self.features[0]] = self
263 self.form = templates.get_template('plugin_form.html')263 self.form = templates.get_template('plugin_form.html')
264 self.list = templates.get_template('plugin_functions.html')264 self.list = templates.get_template('plugin_functions.html')
265265
@@ -306,7 +306,7 @@
306 if name.startswith('remote_'):306 if name.startswith('remote_'):
307 functions.append(name.replace('remote_', '', 1))307 functions.append(name.replace('remote_', '', 1))
308308
309 return self.list.render(object=self.feature[0], functions=functions) \309 return self.list.render(object=self.features[0], functions=functions) \
310 .encode('utf-8')310 .encode('utf-8')
311311
312 args, varargs, varkw, defaults = getargspec(function)312 args, varargs, varkw, defaults = getargspec(function)
313313
=== modified file 'ibid/plugins/admin.py'
--- ibid/plugins/admin.py 2010-02-20 21:58:38 +0000
+++ ibid/plugins/admin.py 2010-03-27 17:38:22 +0000
@@ -21,7 +21,7 @@
21}21}
22class ListPLugins(Processor):22class ListPLugins(Processor):
23 usage = u'list plugins'23 usage = u'list plugins'
24 feature = ('plugins',)24 features = ('plugins',)
2525
26 @match(r'^lsmod|list\s+plugins$')26 @match(r'^lsmod|list\s+plugins$')
27 def handler(self, event):27 def handler(self, event):
@@ -38,7 +38,7 @@
38}38}
39class ReloadCoreModules(Processor):39class ReloadCoreModules(Processor):
40 usage = u'reload (reloader|dispatcher|databases|auth)'40 usage = u'reload (reloader|dispatcher|databases|auth)'
41 feature = ('core',)41 features = ('core',)
4242
43 priority = -543 priority = -5
44 permission = u'core'44 permission = u'core'
@@ -56,7 +56,7 @@
5656
57class LoadModules(Processor):57class LoadModules(Processor):
58 usage = u'(load|unload|reload) <plugin|processor>'58 usage = u'(load|unload|reload) <plugin|processor>'
59 feature = ('plugins',)59 features = ('plugins',)
6060
61 permission = u'plugins'61 permission = u'plugins'
6262
@@ -79,7 +79,7 @@
79}79}
80class Die(Processor):80class Die(Processor):
81 usage = u'die'81 usage = u'die'
82 feature = ('die',)82 features = ('die',)
8383
84 permission = u'admin'84 permission = u'admin'
8585
@@ -95,7 +95,7 @@
95class Admin(Processor):95class Admin(Processor):
96 usage = u"""(connect|disconnect) (to|from) <source>96 usage = u"""(connect|disconnect) (to|from) <source>
97 load <source> source"""97 load <source> source"""
98 feature = ('sources',)98 features = ('sources',)
9999
100 permission = u'sources'100 permission = u'sources'
101101
@@ -129,7 +129,7 @@
129129
130class Info(Processor):130class Info(Processor):
131 usage = u'(sources|list configured sources)'131 usage = u'(sources|list configured sources)'
132 feature = ('sources',)132 features = ('sources',)
133133
134 @match(r'^sources$')134 @match(r'^sources$')
135 def list(self, event):135 def list(self, event):
@@ -149,7 +149,7 @@
149}149}
150class Version(Processor):150class Version(Processor):
151 usage = u'version'151 usage = u'version'
152 feature = ('version',)152 features = ('version',)
153153
154 @match(r'^version$')154 @match(r'^version$')
155 def show_version(self, event):155 def show_version(self, event):
@@ -167,7 +167,7 @@
167 usage = u"""reread config167 usage = u"""reread config
168 set config <name> to <value>168 set config <name> to <value>
169 get config <name>"""169 get config <name>"""
170 feature = ('config',)170 features = ('config',)
171171
172 priority = -10172 priority = -10
173 permission = u'config'173 permission = u'config'
174174
=== modified file 'ibid/plugins/ascii.py'
--- ibid/plugins/ascii.py 2010-02-20 21:58:38 +0000
+++ ibid/plugins/ascii.py 2010-03-27 17:38:22 +0000
@@ -35,7 +35,7 @@
35}35}
36class DrawImage(Processor):36class DrawImage(Processor):
37 usage = u'draw <url> [in colour] [width <width>] [height <height>]'37 usage = u'draw <url> [in colour] [width <width>] [height <height>]'
38 feature = ('draw-aa',)38 features = ('draw-aa',)
3939
40 max_filesize = IntOption('max_filesize', 'Only request this many KiB', 200)40 max_filesize = IntOption('max_filesize', 'Only request this many KiB', 200)
41 def_height = IntOption('def_height', 'Default height for libaa output', 10)41 def_height = IntOption('def_height', 'Default height for libaa output', 10)
@@ -153,7 +153,7 @@
153class WriteFiglet(Processor):153class WriteFiglet(Processor):
154 usage = u"""figlet <text> [in <font>]154 usage = u"""figlet <text> [in <font>]
155 list figlet fonts [from <index>]"""155 list figlet fonts [from <index>]"""
156 feature = ('figlet',)156 features = ('figlet',)
157157
158 max_width = IntOption('max_width', 'Maximum width for ascii output', 60)158 max_width = IntOption('max_width', 'Maximum width for ascii output', 60)
159 fonts_ = Option('fonts', 'Directory or Zip file containing figlet fonts',159 fonts_ = Option('fonts', 'Directory or Zip file containing figlet fonts',
160160
=== modified file 'ibid/plugins/buildbot.py'
--- ibid/plugins/buildbot.py 2010-02-20 21:58:38 +0000
+++ ibid/plugins/buildbot.py 2010-03-27 17:38:22 +0000
@@ -15,7 +15,7 @@
15}}15}}
16class BuildBot(Processor, RPC):16class BuildBot(Processor, RPC):
17 usage = u'rebuild <branch> [ (revision|r) <number> ]'17 usage = u'rebuild <branch> [ (revision|r) <number> ]'
18 feature = ('buildbot',)18 features = ('buildbot',)
19 autoload = False19 autoload = False
2020
21 server = Option('server', 'Buildbot server hostname', 'localhost')21 server = Option('server', 'Buildbot server hostname', 'localhost')
2222
=== modified file 'ibid/plugins/bzr.py'
--- ibid/plugins/bzr.py 2010-02-21 09:45:01 +0000
+++ ibid/plugins/bzr.py 2010-03-27 17:38:22 +0000
@@ -62,7 +62,7 @@
62class Bazaar(Processor, RPC):62class Bazaar(Processor, RPC):
63 usage = u"""(last commit|commit <revno>) [to <repo>] [full]63 usage = u"""(last commit|commit <revno>) [to <repo>] [full]
64 repositories"""64 repositories"""
65 feature = ('bzr',)65 features = ('bzr',)
66 autoload = False66 autoload = False
6767
68 repositories = DictOption('repositories', 'Dict of repositories names and URLs')68 repositories = DictOption('repositories', 'Dict of repositories names and URLs')
6969
=== modified file 'ibid/plugins/calc.py'
--- ibid/plugins/calc.py 2010-02-24 12:55:40 +0000
+++ ibid/plugins/calc.py 2010-03-27 17:38:22 +0000
@@ -37,7 +37,7 @@
37class BC(Processor):37class BC(Processor):
38 usage = u'bc <expression>'38 usage = u'bc <expression>'
3939
40 feature = ('bc',)40 features = ('bc',)
4141
42 bc = Option('bc', 'Path to bc executable', 'bc')42 bc = Option('bc', 'Path to bc executable', 'bc')
43 bc_timeout = FloatOption('bc_timeout', 'Maximum BC execution time (sec)', 2.0)43 bc_timeout = FloatOption('bc_timeout', 'Maximum BC execution time (sec)', 2.0)
@@ -141,7 +141,7 @@
141141
142class Calc(Processor):142class Calc(Processor):
143 usage = u'<expression>'143 usage = u'<expression>'
144 feature = ('calc',)144 features = ('calc',)
145145
146 priority = 500146 priority = 500
147147
@@ -212,7 +212,7 @@
212}212}
213class Random(Processor):213class Random(Processor):
214 usage = u'random [ <max> | <min> <max> ]'214 usage = u'random [ <max> | <min> <max> ]'
215 feature = ('random',)215 features = ('random',)
216216
217 @match('^rand(?:om)?(?:\s+(\d+)(?:\s+(\d+))?)?$')217 @match('^rand(?:om)?(?:\s+(\d+)(?:\s+(\d+))?)?$')
218 def random(self, event, begin, end):218 def random(self, event, begin, end):
219219
=== modified file 'ibid/plugins/codecontest.py'
--- ibid/plugins/codecontest.py 2010-02-20 21:58:38 +0000
+++ ibid/plugins/codecontest.py 2010-03-27 17:38:22 +0000
@@ -38,7 +38,7 @@
38 admin_user = Option('admin_user', 'Admin user on USACO', None)38 admin_user = Option('admin_user', 'Admin user on USACO', None)
39 admin_password = Option('admin_password', 'Admin password on USACO', None)39 admin_password = Option('admin_password', 'Admin password on USACO', None)
4040
41 feature = ('usaco',)41 features = ('usaco',)
42 # Clashes with identity, so lower our priority since if we match, then42 # Clashes with identity, so lower our priority since if we match, then
43 # this is the better match43 # this is the better match
44 priority = -2044 priority = -20
4545
=== modified file 'ibid/plugins/conversions.py'
--- ibid/plugins/conversions.py 2010-03-20 11:27:28 +0000
+++ ibid/plugins/conversions.py 2010-03-27 17:38:22 +0000
@@ -9,6 +9,7 @@
99
10import ibid10import ibid
11from ibid.plugins import Processor, handler, match11from ibid.plugins import Processor, handler, match
12from ibid.compat import any
12from ibid.config import Option13from ibid.config import Option
13from ibid.utils import file_in_path, get_country_codes, human_join, \14from ibid.utils import file_in_path, get_country_codes, human_join, \
14 unicode_output15 unicode_output
@@ -26,7 +27,7 @@
26 [convert] ascii <text> to base <number>27 [convert] ascii <text> to base <number>
27 [convert] <sequence> from base <number> to ascii"""28 [convert] <sequence> from base <number> to ascii"""
2829
29 feature = ('base',)30 features = ('base',)
3031
31 abbr_named_bases = {32 abbr_named_bases = {
32 "hex": 16,33 "hex": 16,
@@ -173,7 +174,8 @@
173 'base': self._base_name(base_to),174 'base': self._base_name(base_to),
174 })175 })
175176
176 if base_to == 64 and [True for plugin in ibid.processors if getattr(plugin, 'feature', None) == 'base64']:177 if base_to == 64 and any(True for plugin in ibid.processors
178 if 'base64' in getattr(plugin, 'features', [])):
177 event.addresponse(u'If you want a base64 encoding, use the "base64" feature')179 event.addresponse(u'If you want a base64 encoding, use the "base64" feature')
178180
179 @handler181 @handler
@@ -213,7 +215,8 @@
213 return215 return
214216
215 event.addresponse(u'That is "%s"', output)217 event.addresponse(u'That is "%s"', output)
216 if base_from == 64 and [True for plugin in ibid.processors if getattr(plugin, 'feature', None) == 'base64']:218 if base_from == 64 and any(True for plugin in ibid.processors
219 if 'base64' in getattr(plugin, 'features', [])):
217 event.addresponse(u'If you want a base64 encoding, use the "base64" feature')220 event.addresponse(u'If you want a base64 encoding, use the "base64" feature')
218221
219features['units'] = {222features['units'] = {
@@ -222,7 +225,7 @@
222}225}
223class Units(Processor):226class Units(Processor):
224 usage = u'convert [<value>] <unit> to <unit>'227 usage = u'convert [<value>] <unit> to <unit>'
225 feature = ('units',)228 features = ('units',)
226 priority = 10229 priority = 10
227230
228 units = Option('units', 'Path to units executable', 'units')231 units = Option('units', 'Path to units executable', 'units')
@@ -303,7 +306,7 @@
303 usage = u"""exchange <amount> <currency> for <currency>306 usage = u"""exchange <amount> <currency> for <currency>
304 currencies for <country>"""307 currencies for <country>"""
305308
306 feature = ('currency',)309 features = ('currency',)
307310
308 headers = {'User-Agent': 'Mozilla/5.0', 'Referer': 'http://www.xe.com/'}311 headers = {'User-Agent': 'Mozilla/5.0', 'Referer': 'http://www.xe.com/'}
309 currencies = {}312 currencies = {}
@@ -433,7 +436,7 @@
433 usage = u"""U+<hex code>436 usage = u"""U+<hex code>
434 unicode (<character>|<character name>|<decimal code>|0x<hex code>)"""437 unicode (<character>|<character name>|<decimal code>|0x<hex code>)"""
435438
436 feature = ('unicode',)439 features = ('unicode',)
437440
438 bidis = {'AL': u'right-to-left Arabic', 'AN': u'Arabic number',441 bidis = {'AL': u'right-to-left Arabic', 'AN': u'Arabic number',
439 'B': u'paragraph separator', 'BN': u'boundary neutral',442 'B': u'paragraph separator', 'BN': u'boundary neutral',
440443
=== modified file 'ibid/plugins/eval.py'
--- ibid/plugins/eval.py 2010-02-20 21:58:38 +0000
+++ ibid/plugins/eval.py 2010-03-27 17:38:22 +0000
@@ -20,7 +20,7 @@
2020
21class Python(Processor):21class Python(Processor):
22 usage = u'py <code>'22 usage = u'py <code>'
23 feature = ('eval',)23 features = ('eval',)
2424
25 permission = u'eval'25 permission = u'eval'
2626
@@ -40,7 +40,7 @@
4040
41class Perl(Processor):41class Perl(Processor):
42 usage = u'pl <code>'42 usage = u'pl <code>'
43 feature = ('eval',)43 features = ('eval',)
4444
45 permission = u'eval'45 permission = u'eval'
4646
@@ -56,7 +56,7 @@
5656
57class Lua(Processor):57class Lua(Processor):
58 usage = u'lua <code>'58 usage = u'lua <code>'
59 feature = ('eval',)59 features = ('eval',)
6060
61 permission = u'eval'61 permission = u'eval'
6262
6363
=== modified file 'ibid/plugins/factoid.py'
--- ibid/plugins/factoid.py 2010-02-24 12:42:45 +0000
+++ ibid/plugins/factoid.py 2010-03-27 17:38:22 +0000
@@ -267,7 +267,7 @@
267267
268class Utils(Processor):268class Utils(Processor):
269 usage = u'literal <name> [( #<from number> | /<pattern>/[r] )]'269 usage = u'literal <name> [( #<from number> | /<pattern>/[r] )]'
270 feature = ('factoid',)270 features = ('factoid',)
271271
272 @match(r'^literal\s+(.+?)(?:\s+#(\d+)|\s+(?:/(.+?)/(r?)))?$')272 @match(r'^literal\s+(.+?)(?:\s+#(\d+)|\s+(?:/(.+?)/(r?)))?$')
273 def literal(self, event, name, number, pattern, is_regex):273 def literal(self, event, name, number, pattern, is_regex):
@@ -282,7 +282,7 @@
282class Forget(Processor):282class Forget(Processor):
283 usage = u"""forget <name> [( #<number> | /<pattern>/[r] )]283 usage = u"""forget <name> [( #<number> | /<pattern>/[r] )]
284 <name> is the same as <other name>"""284 <name> is the same as <other name>"""
285 feature = ('factoid',)285 features = ('factoid',)
286286
287 priority = 10287 priority = 10
288 permission = u'factoid'288 permission = u'factoid'
@@ -378,7 +378,7 @@
378378
379class Search(Processor):379class Search(Processor):
380 usage = u'search [for] [<limit>] [(facts|values) [containing]] (<pattern>|/<pattern>/[r]) [from <start>]'380 usage = u'search [for] [<limit>] [(facts|values) [containing]] (<pattern>|/<pattern>/[r]) [from <start>]'
381 feature = ('factoid',)381 features = ('factoid',)
382382
383 limit = IntOption('search_limit', u'Maximum number of results to return', 30)383 limit = IntOption('search_limit', u'Maximum number of results to return', 30)
384 default = IntOption('search_default', u'Default number of results to return', 10)384 default = IntOption('search_default', u'Default number of results to return', 10)
@@ -453,7 +453,7 @@
453453
454class Get(Processor, RPC):454class Get(Processor, RPC):
455 usage = u'<factoid> [( #<number> | /<pattern>/[r] )]'455 usage = u'<factoid> [( #<number> | /<pattern>/[r] )]'
456 feature = ('factoid',)456 features = ('factoid',)
457457
458 priority = 200458 priority = 200
459459
@@ -505,7 +505,7 @@
505class Set(Processor):505class Set(Processor):
506 usage = u"""<name> (<verb>|=<verb>=) [also] <value>506 usage = u"""<name> (<verb>|=<verb>=) [also] <value>
507 last set factoid"""507 last set factoid"""
508 feature = ('factoid',)508 features = ('factoid',)
509509
510 interrogatives = ListOption('interrogatives', 'Question words to strip', default_interrogatives)510 interrogatives = ListOption('interrogatives', 'Question words to strip', default_interrogatives)
511 verbs = ListOption('verbs', 'Verbs that split name from value', default_verbs)511 verbs = ListOption('verbs', 'Verbs that split name from value', default_verbs)
@@ -583,7 +583,7 @@
583class Modify(Processor):583class Modify(Processor):
584 usage = u"""<name> [( #<number> | /<pattern>/[r] )] += <suffix>584 usage = u"""<name> [( #<number> | /<pattern>/[r] )] += <suffix>
585 <name> [( #<number> | /<pattern>/[r] )] ~= ( s/<regex>/<replacement>/[g][i][r] | y/<source>/<dest>/ )"""585 <name> [( #<number> | /<pattern>/[r] )] ~= ( s/<regex>/<replacement>/[g][i][r] | y/<source>/<dest>/ )"""
586 feature = ('factoid',)586 features = ('factoid',)
587587
588 permission = u'factoid'588 permission = u'factoid'
589 permissions = (u'factoidadmin',)589 permissions = (u'factoidadmin',)
590590
=== modified file 'ibid/plugins/feeds.py'
--- ibid/plugins/feeds.py 2010-02-20 21:58:38 +0000
+++ ibid/plugins/feeds.py 2010-03-27 17:38:22 +0000
@@ -103,7 +103,7 @@
103 poll <name> feed notify <channel> on <source>103 poll <name> feed notify <channel> on <source>
104 stop polling <name> feed104 stop polling <name> feed
105 """105 """
106 feature = ('feeds',)106 features = ('feeds',)
107107
108 permission = u'feeds'108 permission = u'feeds'
109109
@@ -208,7 +208,7 @@
208class Retrieve(Processor):208class Retrieve(Processor):
209 usage = u"""latest [ <count> ] articles from <name> [ starting at <number> ]209 usage = u"""latest [ <count> ] articles from <name> [ starting at <number> ]
210 article ( <number> | /<pattern>/ ) from <name>"""210 article ( <number> | /<pattern>/ ) from <name>"""
211 feature = ('feeds',)211 features = ('feeds',)
212212
213 interval = IntOption('interval', 'Feed Poll interval (in seconds)', 300)213 interval = IntOption('interval', 'Feed Poll interval (in seconds)', 300)
214214
215215
=== modified file 'ibid/plugins/film.py'
--- ibid/plugins/film.py 2010-03-08 15:51:53 +0000
+++ ibid/plugins/film.py 2010-03-27 17:38:22 +0000
@@ -26,7 +26,7 @@
26class TVShow(Processor):26class TVShow(Processor):
27 usage = u'tvshow <show>'27 usage = u'tvshow <show>'
2828
29 feature = ('tvshow',)29 features = ('tvshow',)
3030
31 def remote_tvrage(self, show):31 def remote_tvrage(self, show):
32 info_url = 'http://services.tvrage.com/tools/quickinfo.php?%s'32 info_url = 'http://services.tvrage.com/tools/quickinfo.php?%s'
@@ -88,7 +88,7 @@
88}88}
89class IMDB(Processor):89class IMDB(Processor):
90 usage = u'imdb [search] [character|company|episode|movie|person] <terms> [#<index>]'90 usage = u'imdb [search] [character|company|episode|movie|person] <terms> [#<index>]'
91 feature = ('imdb',)91 features = ('imdb',)
9292
93 access_system = Option("accesssystem", "Method of querying IMDB", "http")93 access_system = Option("accesssystem", "Method of querying IMDB", "http")
94 adult_search = BoolOption("adultsearch", "Include adult films in search results", True)94 adult_search = BoolOption("adultsearch", "Include adult films in search results", True)
9595
=== modified file 'ibid/plugins/fun.py'
--- ibid/plugins/fun.py 2010-02-20 21:58:38 +0000
+++ ibid/plugins/fun.py 2010-03-27 17:38:22 +0000
@@ -20,7 +20,7 @@
20}20}
21class Nickometer(Processor):21class Nickometer(Processor):
22 usage = u'nickometer [<nick>] [with reasons]'22 usage = u'nickometer [<nick>] [with reasons]'
23 feature = ('nickometer',)23 features = ('nickometer',)
2424
25 @match(r'^(?:nick|lame)-?o-?meter(?:(?:\s+for)?\s+(.+?))?(\s+with\s+reasons)?$')25 @match(r'^(?:nick|lame)-?o-?meter(?:(?:\s+for)?\s+(.+?))?(\s+with\s+reasons)?$')
26 def handle_nickometer(self, event, nick, wreasons):26 def handle_nickometer(self, event, nick, wreasons):
@@ -45,7 +45,7 @@
45}45}
46class Choose(Processor):46class Choose(Processor):
47 usage = u'choose <choice> or <choice>...'47 usage = u'choose <choice> or <choice>...'
48 feature = ('choose',)48 features = ('choose',)
4949
50 choose_re = re.compile(r'(?:\s*,\s*(?:or\s+)?)|(?:\s+or\s+)', re.I)50 choose_re = re.compile(r'(?:\s*,\s*(?:or\s+)?)|(?:\s+or\s+)', re.I)
5151
@@ -59,7 +59,7 @@
59}59}
60class Coffee(Processor):60class Coffee(Processor):
61 usage = u'coffee (on|please)'61 usage = u'coffee (on|please)'
62 feature = ('coffee',)62 features = ('coffee',)
6363
64 pots = {}64 pots = {}
6565
@@ -114,7 +114,7 @@
114class Insult(Processor):114class Insult(Processor):
115 usage = u"""(flame | insult) <person>115 usage = u"""(flame | insult) <person>
116 (swear | cuss | explete) [at <person>]"""116 (swear | cuss | explete) [at <person>]"""
117 feature = ('insult',)117 features = ('insult',)
118118
119 adjectives = ListOption('adjectives', 'List of adjectives', (119 adjectives = ListOption('adjectives', 'List of adjectives', (
120 u'acidic', u'antique', u'artless', u'base-court', u'bat-fowling',120 u'acidic', u'antique', u'artless', u'base-court', u'bat-fowling',
121121
=== modified file 'ibid/plugins/games.py'
--- ibid/plugins/games.py 2010-02-20 21:58:38 +0000
+++ ibid/plugins/games.py 2010-03-27 17:38:22 +0000
@@ -28,7 +28,7 @@
28 I throw the gauntlet down at <user>'s feet [over <something>]28 I throw the gauntlet down at <user>'s feet [over <something>]
29 """29 """
3030
31 feature = ('duel',)31 features = ('duel',)
3232
33 accept_timeout = FloatOption('accept_timeout', 'How long do we wait for acceptance?', 60.0)33 accept_timeout = FloatOption('accept_timeout', 'How long do we wait for acceptance?', 60.0)
34 start_delay = IntOption('start_delay', 'Time between acceptance and start of duel (rounded down to the highest minute)', 30)34 start_delay = IntOption('start_delay', 'Time between acceptance and start of duel (rounded down to the highest minute)', 30)
@@ -219,7 +219,7 @@
219 usage = u"""draw [my <weapon>]219 usage = u"""draw [my <weapon>]
220 bam|pew|bang|kapow|pewpew|holyhandgrenadeofantioch"""220 bam|pew|bang|kapow|pewpew|holyhandgrenadeofantioch"""
221221
222 feature = ('duel',)222 features = ('duel',)
223223
224 # Parameters for Processor:224 # Parameters for Processor:
225 event_types = (u'message', u'action')225 event_types = (u'message', u'action')
@@ -402,7 +402,7 @@
402 )), duel.names[shooter], address=False)402 )), duel.names[shooter], address=False)
403403
404class DuelFlee(Processor):404class DuelFlee(Processor):
405 feature = ('duel',)405 features = ('duel',)
406 addressed = False406 addressed = False
407 event_types = (u'state',)407 event_types = (u'state',)
408408
@@ -461,7 +461,7 @@
461 ( kill | see | eat ) <villager>461 ( kill | see | eat ) <villager>
462 vote for <villager>462 vote for <villager>
463 """463 """
464 feature = ('werewolf',)464 features = ('werewolf',)
465 state = None465 state = None
466466
467 player_limit = IntOption('min_players', 'The minimum number of players', 5)467 player_limit = IntOption('min_players', 'The minimum number of players', 5)
@@ -848,7 +848,7 @@
848 return self.state.__name__848 return self.state.__name__
849849
850class WerewolfState(Processor):850class WerewolfState(Processor):
851 feature = ('werewolf',)851 features = ('werewolf',)
852 event_types = (u'state',)852 event_types = (u'state',)
853853
854 @handler854 @handler
855855
=== modified file 'ibid/plugins/gameservers.py'
--- ibid/plugins/gameservers.py 2010-03-19 12:24:38 +0000
+++ ibid/plugins/gameservers.py 2010-03-27 17:38:22 +0000
@@ -16,7 +16,7 @@
1616
17class Bnet(Processor):17class Bnet(Processor):
18 usage = u'dota players | who is playing dota'18 usage = u'dota players | who is playing dota'
19 feature = ('gameservers',)19 features = ('gameservers',)
20 autoload = False20 autoload = False
2121
22 bnet_host = Option('bnet_host', 'Bnet server hostname / IP', '127.0.0.1')22 bnet_host = Option('bnet_host', 'Bnet server hostname / IP', '127.0.0.1')
@@ -54,7 +54,7 @@
5454
55class CounterStrike(Processor):55class CounterStrike(Processor):
56 usage = u'cs players | who is playing cs'56 usage = u'cs players | who is playing cs'
57 feature = ('gameservers',)57 features = ('gameservers',)
58 autoload = False58 autoload = False
5959
60 cs_host = Option('cs_host', 'CS server hostname / IP', '127.0.0.1')60 cs_host = Option('cs_host', 'CS server hostname / IP', '127.0.0.1')
6161
=== modified file 'ibid/plugins/geography.py'
--- ibid/plugins/geography.py 2010-03-22 10:15:49 +0000
+++ ibid/plugins/geography.py 2010-03-27 17:38:22 +0000
@@ -37,7 +37,7 @@
37 # http://www.mathforum.com/library/drmath/view/51711.html37 # http://www.mathforum.com/library/drmath/view/51711.html
38 # http://mathworld.wolfram.com/GreatCircle.html38 # http://mathworld.wolfram.com/GreatCircle.html
3939
40 feature = ('distance',)40 features = ('distance',)
4141
42 default_unit_names = {42 default_unit_names = {
43 'km': "kilometres",43 'km': "kilometres",
@@ -118,7 +118,7 @@
118 usage = u"""weather in <city>118 usage = u"""weather in <city>
119 forecast for <city>"""119 forecast for <city>"""
120120
121 feature = ('weather',)121 features = ('weather',)
122122
123 defaults = { 'ct': 'Cape Town, South Africa',123 defaults = { 'ct': 'Cape Town, South Africa',
124 'jhb': 'Johannesburg, South Africa',124 'jhb': 'Johannesburg, South Africa',
@@ -236,7 +236,7 @@
236class TimeZone(Processor):236class TimeZone(Processor):
237 usage = u"""when is <time> <place|timezone> in <place|timezone>237 usage = u"""when is <time> <place|timezone> in <place|timezone>
238 time in <place|timezone>"""238 time in <place|timezone>"""
239 feature = ('timezone',)239 features = ('timezone',)
240240
241 zoneinfo = Option('zoneinfo', 'Timezone info directory', '/usr/share/zoneinfo')241 zoneinfo = Option('zoneinfo', 'Timezone info directory', '/usr/share/zoneinfo')
242 custom_zones = DictOption('timezones', 'Custom timezone names', CUSTOM_ZONES)242 custom_zones = DictOption('timezones', 'Custom timezone names', CUSTOM_ZONES)
@@ -402,7 +402,7 @@
402 usage = u"""airport [in] <name|location|code>402 usage = u"""airport [in] <name|location|code>
403 [<cheapest|quickest>] flight from <departure> to <destination> from <depart_date> [anytime|morning|afternoon|evening|<time>] to <return_date> [anytime|morning|afternoon|evening|<time>]"""403 [<cheapest|quickest>] flight from <departure> to <destination> from <depart_date> [anytime|morning|afternoon|evening|<time>] to <return_date> [anytime|morning|afternoon|evening|<time>]"""
404404
405 feature = ('flight',)405 features = ('flight',)
406406
407 airports_url = u'http://openflights.svn.sourceforge.net/viewvc/openflights/openflights/data/airports.dat'407 airports_url = u'http://openflights.svn.sourceforge.net/viewvc/openflights/openflights/data/airports.dat'
408 max_results = IntOption('max_results', 'Maximum number of results to list', 5)408 max_results = IntOption('max_results', 'Maximum number of results to list', 5)
409409
=== modified file 'ibid/plugins/google.py'
--- ibid/plugins/google.py 2010-03-06 18:18:29 +0000
+++ ibid/plugins/google.py 2010-03-27 17:38:22 +0000
@@ -23,7 +23,7 @@
23 usage = u"""google[.<tld>] [for] <term>23 usage = u"""google[.<tld>] [for] <term>
24 googlefight [for] <term> and <term>"""24 googlefight [for] <term> and <term>"""
2525
26 feature = ('google',)26 features = ('google',)
2727
28 api_key = Option('api_key', 'Your Google API Key (optional)', None)28 api_key = Option('api_key', 'Your Google API Key (optional)', None)
29 referer = Option('referer', 'The referer string to use (API searches)', default_referer)29 referer = Option('referer', 'The referer string to use (API searches)', default_referer)
@@ -89,7 +89,7 @@
89 usage = u"""gcalc <expression>89 usage = u"""gcalc <expression>
90 gdefine <term>"""90 gdefine <term>"""
9191
92 feature = ('google',)92 features = ('google',)
9393
94 user_agent = Option('user_agent', 'HTTP user agent to present to Google (for non-API searches)', default_user_agent)94 user_agent = Option('user_agent', 'HTTP user agent to present to Google (for non-API searches)', default_user_agent)
95 google_scrape_url = "http://www.google.com/search?q=%s"95 google_scrape_url = "http://www.google.com/search?q=%s"
9696
=== modified file 'ibid/plugins/help.py'
--- ibid/plugins/help.py 2010-03-05 15:10:37 +0000
+++ ibid/plugins/help.py 2010-03-27 17:38:22 +0000
@@ -31,7 +31,7 @@
31 how do I use <feature>31 how do I use <feature>
32 help <(category|feature)>32 help <(category|feature)>
33 """33 """
34 feature = ('help',)34 features = ('help',)
35 stemmer = Stemmer('english')35 stemmer = Stemmer('english')
3636
37 def _get_features(self):37 def _get_features(self):
@@ -50,7 +50,7 @@
50 features = {}50 features = {}
51 processor_modules = set()51 processor_modules = set()
52 for processor in ibid.processors:52 for processor in ibid.processors:
53 for feature in getattr(processor, 'feature', []):53 for feature in getattr(processor, 'features', []):
54 if feature not in features:54 if feature not in features:
55 features[feature] = {55 features[feature] = {
56 'name': feature,56 'name': feature,
5757
=== modified file 'ibid/plugins/icecast.py'
--- ibid/plugins/icecast.py 2010-02-20 21:58:38 +0000
+++ ibid/plugins/icecast.py 2010-03-27 17:38:22 +0000
@@ -17,7 +17,7 @@
17}}17}}
18class ICECast(Processor):18class ICECast(Processor):
19 usage = u"what's playing [on <stream>]?"19 usage = u"what's playing [on <stream>]?"
20 feature = ('icecast',)20 features = ('icecast',)
2121
22 interval = IntOption('interval',22 interval = IntOption('interval',
23 'Interval between checking for song changes', 60)23 'Interval between checking for song changes', 60)
2424
=== modified file 'ibid/plugins/identity.py'
--- ibid/plugins/identity.py 2010-02-20 21:58:38 +0000
+++ ibid/plugins/identity.py 2010-03-27 17:38:22 +0000
@@ -29,7 +29,7 @@
29 usage = u"""create account [<name>]29 usage = u"""create account [<name>]
30 delete (my account|account <name>)30 delete (my account|account <name>)
31 rename (my account|account <name>) to <name>"""31 rename (my account|account <name>) to <name>"""
32 feature = ('accounts',)32 features = ('accounts',)
3333
34 @match(r'^create\s+account(?:\s+(.+))?$')34 @match(r'^create\s+account(?:\s+(.+))?$')
35 def new_account(self, event, username):35 def new_account(self, event, username):
@@ -146,7 +146,7 @@
146class Identities(Processor):146class Identities(Processor):
147 usage = u"""(I am|<username> is) <identity> on <source>147 usage = u"""(I am|<username> is) <identity> on <source>
148 remove identity <identity> on <source> [from <username>]"""148 remove identity <identity> on <source> [from <username>]"""
149 feature = ('accounts',)149 features = ('accounts',)
150 priority = -10150 priority = -10
151151
152 def __init__(self, name):152 def __init__(self, name):
@@ -319,7 +319,7 @@
319319
320class Attributes(Processor):320class Attributes(Processor):
321 usage = u'set (my|<account>) <name> to <value>'321 usage = u'set (my|<account>) <name> to <value>'
322 feature = ('accounts',)322 features = ('accounts',)
323323
324 @match(r"^set\s+(my|.+?)(?:\'s)?\s+(.+)\s+to\s+(.+)$")324 @match(r"^set\s+(my|.+?)(?:\'s)?\s+(.+)\s+to\s+(.+)$")
325 def attribute(self, event, username, name, value):325 def attribute(self, event, username, name, value):
@@ -353,7 +353,7 @@
353353
354class Describe(Processor):354class Describe(Processor):
355 usage = u'who (am I|is <username>)'355 usage = u'who (am I|is <username>)'
356 feature = ('accounts',)356 features = ('accounts',)
357357
358 @match(r'^who\s+(?:is|am)\s+(I|.+?)$')358 @match(r'^who\s+(?:is|am)\s+(I|.+?)$')
359 def describe(self, event, username):359 def describe(self, event, username):
@@ -384,7 +384,7 @@
384}384}
385class Summon(Processor):385class Summon(Processor):
386 usage = u'summon <person> [via <source>]'386 usage = u'summon <person> [via <source>]'
387 feature = ('summon',)387 features = ('summon',)
388 permission = u'summon'388 permission = u'summon'
389389
390 default_source = Option('default_source',390 default_source = Option('default_source',
@@ -509,7 +509,7 @@
509}509}
510class AddAuth(Processor):510class AddAuth(Processor):
511 usage = u'authenticate <account> [on source] using <method> [<credential>]'511 usage = u'authenticate <account> [on source] using <method> [<credential>]'
512 feature = ('auth',)512 features = ('auth',)
513513
514 @match(r'^authenticate\s+(.+?)(?:\s+on\s+(.+))?\s+using\s+(\S+)\s+(.+)$')514 @match(r'^authenticate\s+(.+?)(?:\s+on\s+(.+))?\s+using\s+(\S+)\s+(.+)$')
515 def handler(self, event, user, source, method, credential):515 def handler(self, event, user, source, method, credential):
@@ -557,7 +557,7 @@
557 usage = u"""(grant|revoke|remove) <permission> (to|from|on) <username> [when authed]557 usage = u"""(grant|revoke|remove) <permission> (to|from|on) <username> [when authed]
558 permissions [for <username>]558 permissions [for <username>]
559 list permissions"""559 list permissions"""
560 feature = ('auth',)560 features = ('auth',)
561561
562 permission = u'admin'562 permission = u'admin'
563563
@@ -643,7 +643,7 @@
643643
644class Auth(Processor):644class Auth(Processor):
645 usage = u'auth <credential>'645 usage = u'auth <credential>'
646 feature = ('auth',)646 features = ('auth',)
647647
648 @match(r'^auth(?:\s+(.+))?$')648 @match(r'^auth(?:\s+(.+))?$')
649 def handler(self, event, password):649 def handler(self, event, password):
650650
=== modified file 'ibid/plugins/karma.py'
--- ibid/plugins/karma.py 2010-02-20 21:58:38 +0000
+++ ibid/plugins/karma.py 2010-03-27 17:38:22 +0000
@@ -51,7 +51,7 @@
5151
52class Set(Processor):52class Set(Processor):
53 usage = u'<subject> (++|--|==|ftw|ftl) [[reason]]'53 usage = u'<subject> (++|--|==|ftw|ftl) [[reason]]'
54 feature = ('karma',)54 features = ('karma',)
5555
56 # Clashes with morse & math56 # Clashes with morse & math
57 priority = 51057 priority = 510
@@ -126,7 +126,7 @@
126class Get(Processor):126class Get(Processor):
127 usage = u"""karma for <subject>127 usage = u"""karma for <subject>
128 [reverse] karmaladder"""128 [reverse] karmaladder"""
129 feature = ('karma',)129 features = ('karma',)
130130
131 @match(r'^karma\s+(?:for\s+)?(.+)$')131 @match(r'^karma\s+(?:for\s+)?(.+)$')
132 def handle_karma(self, event, subject):132 def handle_karma(self, event, subject):
@@ -153,7 +153,7 @@
153153
154class Forget(Processor):154class Forget(Processor):
155 usage = u'forget karma for <subject> [[reason]]'155 usage = u'forget karma for <subject> [[reason]]'
156 feature = ('karma',)156 features = ('karma',)
157157
158 # Clashes with factoid158 # Clashes with factoid
159 priority = -10159 priority = -10
160160
=== modified file 'ibid/plugins/languages.py'
--- ibid/plugins/languages.py 2010-03-02 19:41:09 +0000
+++ ibid/plugins/languages.py 2010-03-27 17:38:22 +0000
@@ -24,7 +24,7 @@
24 define <word> [using <dictionary>]24 define <word> [using <dictionary>]
25 (dictionaries|strategies)25 (dictionaries|strategies)
26 (dictionary|strategy) <name>"""26 (dictionary|strategy) <name>"""
27 feature = ('dict',)27 features = ('dict',)
2828
29 server = Option('server', 'Dictionary server hostname', 'localhost')29 server = Option('server', 'Dictionary server hostname', 'localhost')
30 port = IntOption('port', 'Dictionary server port number', 2628)30 port = IntOption('port', 'Dictionary server port number', 2628)
@@ -141,7 +141,7 @@
141 usage = u"""translate (<phrase>|<url>) [from <language>] [to <language>]141 usage = u"""translate (<phrase>|<url>) [from <language>] [to <language>]
142 translation chain <phrase> [from <language>] [to <language>]"""142 translation chain <phrase> [from <language>] [to <language>]"""
143143
144 feature = ('translate',)144 features = ('translate',)
145145
146 api_key = Option('api_key', 'Your Google API Key (optional)', None)146 api_key = Option('api_key', 'Your Google API Key (optional)', None)
147 referer = Option('referer', 'The referer string to use (API searches)', default_referer)147 referer = Option('referer', 'The referer string to use (API searches)', default_referer)
148148
=== modified file 'ibid/plugins/lotto.py'
--- ibid/plugins/lotto.py 2010-02-21 09:45:01 +0000
+++ ibid/plugins/lotto.py 2010-03-27 17:38:22 +0000
@@ -17,7 +17,7 @@
17class Lotto(Processor):17class Lotto(Processor):
18 usage = u'lotto'18 usage = u'lotto'
1919
20 feature = ('lotto',)20 features = ('lotto',)
2121
22 za_url = 'http://www.nationallottery.co.za/'22 za_url = 'http://www.nationallottery.co.za/'
23 za_re = re.compile(r'images/(?:power_)?balls/(?:ball|power)_(\d+).gif')23 za_re = re.compile(r'images/(?:power_)?balls/(?:ball|power)_(\d+).gif')
2424
=== modified file 'ibid/plugins/meetings.py'
--- ibid/plugins/meetings.py 2010-02-20 21:58:38 +0000
+++ ibid/plugins/meetings.py 2010-03-27 17:38:22 +0000
@@ -37,7 +37,7 @@
37 minutes so far37 minutes so far
38 meeting title is <title>38 meeting title is <title>
39 """39 """
40 feature = ('meeting',)40 features = ('meeting',)
41 permission = u'chairmeeting'41 permission = u'chairmeeting'
4242
43 formats = Option('formats', u'Formats to log to. '43 formats = Option('formats', u'Formats to log to. '
@@ -244,7 +244,7 @@
244 addressed = False244 addressed = False
245 processed = True245 processed = True
246 priority = 1900246 priority = 1900
247 feature = ('meeting',)247 features = ('meeting',)
248248
249 def process(self, event):249 def process(self, event):
250 if 'channel' in event and 'source' in event \250 if 'channel' in event and 'source' in event \
@@ -283,7 +283,7 @@
283 vote (<id> | <option>) [on <topic>]283 vote (<id> | <option>) [on <topic>]
284 end poll284 end poll
285 """285 """
286 feature = ('poll',)286 features = ('poll',)
287 permission = u'chairmeeting'287 permission = u'chairmeeting'
288288
289 polls = {}289 polls = {}
290290
=== modified file 'ibid/plugins/memo.py'
--- ibid/plugins/memo.py 2010-02-20 21:58:38 +0000
+++ ibid/plugins/memo.py 2010-03-27 17:38:22 +0000
@@ -65,7 +65,7 @@
65class Tell(Processor):65class Tell(Processor):
66 usage = u"""(tell|pm|privmsg|msg|ask) <person> [on <source>] <message>66 usage = u"""(tell|pm|privmsg|msg|ask) <person> [on <source>] <message>
67 forget my (first|last|<n>th) message for <person> [on <source>]"""67 forget my (first|last|<n>th) message for <person> [on <source>]"""
68 feature = ('memo',)68 features = ('memo',)
6969
70 permission = u'sendmemo'70 permission = u'sendmemo'
71 permissions = (u'recvmemo',)71 permissions = (u'recvmemo',)
@@ -228,7 +228,7 @@
228 .order_by(Memo.time.asc()).all()228 .order_by(Memo.time.asc()).all()
229229
230class Deliver(Processor):230class Deliver(Processor):
231 feature = ('memo',)231 features = ('memo',)
232232
233 addressed = False233 addressed = False
234 processed = True234 processed = True
@@ -289,7 +289,7 @@
289 nomemos_cache.add(event.identity)289 nomemos_cache.add(event.identity)
290290
291class Notify(Processor):291class Notify(Processor):
292 feature = ('memo',)292 features = ('memo',)
293293
294 event_types = (u'state',)294 event_types = (u'state',)
295 addressed = False295 addressed = False
@@ -325,7 +325,7 @@
325 usage = u"""my messages325 usage = u"""my messages
326 message <number>326 message <number>
327 my messages for <person> [on <source>]"""327 my messages for <person> [on <source>]"""
328 feature = ('memo',)328 features = ('memo',)
329329
330 @match(r'^my\s+messages$')330 @match(r'^my\s+messages$')
331 def messages(self, event):331 def messages(self, event):
332332
=== modified file 'ibid/plugins/memory.py'
--- ibid/plugins/memory.py 2010-02-21 09:45:01 +0000
+++ ibid/plugins/memory.py 2010-03-27 17:38:22 +0000
@@ -26,7 +26,7 @@
2626
27class MemoryLog(Processor):27class MemoryLog(Processor):
2828
29 feature = ('memory',)29 features = ('memory',)
30 autoload = False30 autoload = False
3131
32 mem_filename = Option('mem_filename', 'Memory log filename', 'logs/memory.log')32 mem_filename = Option('mem_filename', 'Memory log filename', 'logs/memory.log')
@@ -99,7 +99,7 @@
99class MemoryInfo(Processor):99class MemoryInfo(Processor):
100 usage = u'memory usage'100 usage = u'memory usage'
101101
102 feature = ('memory',)102 features = ('memory',)
103103
104 @match('^memory\s+usage$')104 @match('^memory\s+usage$')
105 def memory_usage(self, event):105 def memory_usage(self, event):
106106
=== modified file 'ibid/plugins/network.py'
--- ibid/plugins/network.py 2010-03-07 10:08:03 +0000
+++ ibid/plugins/network.py 2010-03-27 17:38:22 +0000
@@ -33,7 +33,7 @@
33class DNS(Processor):33class DNS(Processor):
34 usage = u'dns [<record type>] [for] <host> [from <nameserver>]'34 usage = u'dns [<record type>] [for] <host> [from <nameserver>]'
3535
36 feature = ('dns',)36 features = ('dns',)
3737
38 def setup(self):38 def setup(self):
39 if Resolver is None:39 if Resolver is None:
@@ -82,7 +82,7 @@
82}82}
83class Ping(Processor):83class Ping(Processor):
84 usage = u'ping <host>'84 usage = u'ping <host>'
85 feature = ('ping',)85 features = ('ping',)
8686
87 ping = Option('ping', 'Path to ping executable', 'ping')87 ping = Option('ping', 'Path to ping executable', 'ping')
8888
@@ -115,7 +115,7 @@
115}115}
116class Tracepath(Processor):116class Tracepath(Processor):
117 usage = u'tracepath <host>'117 usage = u'tracepath <host>'
118 feature = ('tracepath',)118 features = ('tracepath',)
119119
120 tracepath = Option('tracepath', 'Path to tracepath executable', 'tracepath')120 tracepath = Option('tracepath', 'Path to tracepath executable', 'tracepath')
121121
@@ -144,7 +144,7 @@
144class IPCalc(Processor):144class IPCalc(Processor):
145 usage = u"""ipcalc <network>/<subnet>145 usage = u"""ipcalc <network>/<subnet>
146 ipcalc <address> - <address>"""146 ipcalc <address> - <address>"""
147 feature = ('ipcalc',)147 features = ('ipcalc',)
148148
149 ipcalc = Option('ipcalc', 'Path to ipcalc executable', 'ipcalc')149 ipcalc = Option('ipcalc', 'Path to ipcalc executable', 'ipcalc')
150150
@@ -221,7 +221,7 @@
221 usage = u"""(get|head) <url>221 usage = u"""(get|head) <url>
222 is <domain> (up|down)222 is <domain> (up|down)
223 tell me when <domain|url> is up"""223 tell me when <domain|url> is up"""
224 feature = ('http',)224 features = ('http',)
225 priority = -10225 priority = -10
226226
227 max_size = IntOption('max_size', u'Only request this many bytes', 500)227 max_size = IntOption('max_size', u'Only request this many bytes', 500)
@@ -417,7 +417,7 @@
417class TLD(Processor):417class TLD(Processor):
418 usage = u""".<tld>418 usage = u""".<tld>
419 tld for <country>"""419 tld for <country>"""
420 feature = ('tld',)420 features = ('tld',)
421421
422 country_codes = {}422 country_codes = {}
423423
@@ -461,7 +461,7 @@
461class Ports(Processor):461class Ports(Processor):
462 usage = u"""port for <protocol>462 usage = u"""port for <protocol>
463 (tcp|udp) port <number>"""463 (tcp|udp) port <number>"""
464 feature = ('ports',)464 features = ('ports',)
465 priority = 10465 priority = 10
466466
467 services = Option('services', 'Path to services file', '/etc/services')467 services = Option('services', 'Path to services file', '/etc/services')
@@ -534,7 +534,7 @@
534 usage = u"""port scan <hostname>534 usage = u"""port scan <hostname>
535 net scan <network>/<prefix>"""535 net scan <network>/<prefix>"""
536536
537 feature = ('nmap',)537 features = ('nmap',)
538 permission = 'nmap'538 permission = 'nmap'
539 min_prefix = IntOption('min_prefix', 'Minimum network prefix that may be scanned', 24)539 min_prefix = IntOption('min_prefix', 'Minimum network prefix that may be scanned', 24)
540540
541541
=== modified file 'ibid/plugins/oeis.py'
--- ibid/plugins/oeis.py 2010-02-20 21:58:38 +0000
+++ ibid/plugins/oeis.py 2010-03-27 17:38:22 +0000
@@ -19,7 +19,7 @@
19 usage = u"""oeis (A<OEIS number>|M<EIS number>|N<HIS number>)19 usage = u"""oeis (A<OEIS number>|M<EIS number>|N<HIS number>)
20 oeis <term>[, ...]"""20 oeis <term>[, ...]"""
2121
22 feature = ('oeis',)22 features = ('oeis',)
2323
24 @match(r'^oeis\s+([AMN]\d+|-?\d(?:\d|-|,|\s)*)$')24 @match(r'^oeis\s+([AMN]\d+|-?\d(?:\d|-|,|\s)*)$')
25 def oeis (self, event, query):25 def oeis (self, event, query):
2626
=== modified file 'ibid/plugins/quotes.py'
--- ibid/plugins/quotes.py 2010-03-27 14:18:33 +0000
+++ ibid/plugins/quotes.py 2010-03-27 17:38:22 +0000
@@ -27,7 +27,7 @@
27}27}
28class Fortune(Processor, RPC):28class Fortune(Processor, RPC):
29 usage = u'fortune'29 usage = u'fortune'
30 feature = ('fortune',)30 features = ('fortune',)
3131
32 fortune = Option('fortune', 'Path of the fortune executable', 'fortune')32 fortune = Option('fortune', 'Path of the fortune executable', 'fortune')
3333
@@ -66,7 +66,7 @@
66class Bash(Processor):66class Bash(Processor):
67 usage = u'bash[.org] [(random|<number>)]'67 usage = u'bash[.org] [(random|<number>)]'
6868
69 feature = ('bash',)69 features = ('bash',)
7070
71 public_browse = BoolOption('public_browse', 'Allow random quotes in public', True)71 public_browse = BoolOption('public_browse', 'Allow random quotes in public', True)
7272
@@ -103,7 +103,7 @@
103class FMyLife(Processor):103class FMyLife(Processor):
104 usage = u'fml (<number> | [random] | flop | top | last | love | money | kids | work | health | sex | miscellaneous )'104 usage = u'fml (<number> | [random] | flop | top | last | love | money | kids | work | health | sex | miscellaneous )'
105105
106 feature = ('fml',)106 features = ('fml',)
107107
108 api_url = Option('fml_api_url', 'FML API URL base', 'http://api.betacie.com/')108 api_url = Option('fml_api_url', 'FML API URL base', 'http://api.betacie.com/')
109 # The Ibid API Key, registered by Stefano Rivera:109 # The Ibid API Key, registered by Stefano Rivera:
@@ -173,7 +173,7 @@
173 usage = u"""tfln [(random|<number>)]173 usage = u"""tfln [(random|<number>)]
174 tfln (worst|best) [(today|this week|this month)]"""174 tfln (worst|best) [(today|this week|this month)]"""
175175
176 feature = ('tfln',)176 features = ('tfln',)
177177
178 public_browse = BoolOption('public_browse', 'Allow random quotes in public', True)178 public_browse = BoolOption('public_browse', 'Allow random quotes in public', True)
179179
@@ -252,7 +252,7 @@
252 usage = u"""mlia [(<number> | random | recent | today | yesterday | this week | this month | this year )]252 usage = u"""mlia [(<number> | random | recent | today | yesterday | this week | this month | this year )]
253 mlig [(<number> | random | recent | today | yesterday | this week | this month | this year )]"""253 mlig [(<number> | random | recent | today | yesterday | this week | this month | this year )]"""
254254
255 feature = ('mlia',)255 features = ('mlia',)
256256
257 public_browse = BoolOption('public_browse',257 public_browse = BoolOption('public_browse',
258 'Allow random quotes in public', True)258 'Allow random quotes in public', True)
@@ -367,7 +367,7 @@
367 usage = u"""bible <passages> [in <version>]367 usage = u"""bible <passages> [in <version>]
368 <book> <verses> [in <version>]"""368 <book> <verses> [in <version>]"""
369369
370 feature = ('bible',)370 features = ('bible',)
371 # http://labs.bible.org/api/ is an alternative371 # http://labs.bible.org/api/ is an alternative
372 # Their feature set is a little different, but they should be fairly372 # Their feature set is a little different, but they should be fairly
373 # compatible373 # compatible
374374
=== modified file 'ibid/plugins/rfc.py'
--- ibid/plugins/rfc.py 2010-02-20 21:58:38 +0000
+++ ibid/plugins/rfc.py 2010-03-27 17:38:22 +0000
@@ -21,7 +21,7 @@
21 usage = u"""rfc <number>21 usage = u"""rfc <number>
22 rfc [for] <search terms>22 rfc [for] <search terms>
23 rfc [for] /regex/"""23 rfc [for] /regex/"""
24 feature = ('rfc',)24 features = ('rfc',)
2525
26 indexurl = Option('index_url', "A HTTP url for the RFC Index file", "http://www.rfc-editor.org/rfc/rfc-index.txt")26 indexurl = Option('index_url', "A HTTP url for the RFC Index file", "http://www.rfc-editor.org/rfc/rfc-index.txt")
27 cachetime = IntOption("cachetime", "Time to cache RFC index for", cachetime)27 cachetime = IntOption("cachetime", "Time to cache RFC index for", cachetime)
2828
=== modified file 'ibid/plugins/seen.py'
--- ibid/plugins/seen.py 2010-02-20 21:58:38 +0000
+++ ibid/plugins/seen.py 2010-03-27 17:38:22 +0000
@@ -63,7 +63,7 @@
63 self.type, self.identity_id, self.channel, self.time, self.value)63 self.type, self.identity_id, self.channel, self.time, self.value)
6464
65class See(Processor):65class See(Processor):
66 feature = ('seen',)66 features = ('seen',)
6767
68 priority = 150068 priority = 1500
69 event_types = (u'message', u'state')69 event_types = (u'message', u'state')
@@ -98,7 +98,7 @@
9898
99class Seen(Processor):99class Seen(Processor):
100 usage = u'seen <who>'100 usage = u'seen <who>'
101 feature = ('seen',)101 features = ('seen',)
102102
103 @match(r'^(?:have\s+you\s+)?seen\s+(\S+)(?:\s+on\s+(\S+))?$')103 @match(r'^(?:have\s+you\s+)?seen\s+(\S+)(?:\s+on\s+(\S+))?$')
104 def handler(self, event, who, source):104 def handler(self, event, who, source):
105105
=== modified file 'ibid/plugins/social.py'
--- ibid/plugins/social.py 2010-03-01 15:13:45 +0000
+++ ibid/plugins/social.py 2010-03-27 17:38:22 +0000
@@ -24,7 +24,7 @@
24class LastFm(Processor):24class LastFm(Processor):
25 usage = u'last.fm for <username>'25 usage = u'last.fm for <username>'
2626
27 feature = ('lastfm',)27 features = ('lastfm',)
2828
29 @match(r'^last\.?fm\s+for\s+(\S+?)\s*$')29 @match(r'^last\.?fm\s+for\s+(\S+?)\s*$')
30 def listsongs(self, event, username):30 def listsongs(self, event, username):
@@ -46,7 +46,7 @@
46 usage = u"""latest (tweet|identica) from <name>46 usage = u"""latest (tweet|identica) from <name>
47 (tweet|identica) <number>"""47 (tweet|identica) <number>"""
4848
49 feature = ('microblog',)49 features = ('microblog',)
5050
51 default = {51 default = {
52 'twitter': {'endpoint': 'http://twitter.com/', 'api': 'twitter', 'name': 'tweet', 'user': 'twit'},52 'twitter': {'endpoint': 'http://twitter.com/', 'api': 'twitter', 'name': 'tweet', 'user': 'twit'},
5353
=== modified file 'ibid/plugins/sources.py'
--- ibid/plugins/sources.py 2010-03-14 10:27:08 +0000
+++ ibid/plugins/sources.py 2010-03-27 17:38:22 +0000
@@ -22,7 +22,7 @@
22class Actions(Processor):22class Actions(Processor):
23 usage = u"""(join|part|leave) [<channel> [on <source>]]23 usage = u"""(join|part|leave) [<channel> [on <source>]]
24 change nick to <nick> [on <source>]"""24 change nick to <nick> [on <source>]"""
25 feature = ('actions',)25 features = ('actions',)
2626
27 permission = 'sources'27 permission = 'sources'
2828
@@ -75,7 +75,7 @@
75 event.addresponse(u'Changing nick to %s', nick)75 event.addresponse(u'Changing nick to %s', nick)
7676
77class Invited(Processor):77class Invited(Processor):
78 feature = ('actions',)78 features = ('actions',)
7979
80 event_types = ('invite',)80 event_types = ('invite',)
81 permission = 'sources'81 permission = 'sources'
@@ -120,7 +120,7 @@
120}120}
121class SayDo(Processor):121class SayDo(Processor):
122 usage = u'(say|do) in <channel> [on <source>] <text>'122 usage = u'(say|do) in <channel> [on <source>] <text>'
123 feature = ('saydo',)123 features = ('saydo',)
124124
125 permission = u'saydo'125 permission = u'saydo'
126126
@@ -137,7 +137,7 @@
137}137}
138class RedirectCommand(Processor):138class RedirectCommand(Processor):
139 usage = u'redirect [to] <channel> [on <source>] <command>'139 usage = u'redirect [to] <channel> [on <source>] <command>'
140 feature = ('redirect',)140 features = ('redirect',)
141141
142 priority = -1200142 priority = -1200
143 permission = u'saydo'143 permission = u'saydo'
@@ -154,7 +154,7 @@
154 event.message['clean'] = command154 event.message['clean'] = command
155155
156class Redirect(Processor):156class Redirect(Processor):
157 feature = ('redirect',)157 features = ('redirect',)
158158
159 processed = True159 processed = True
160 priority = 940160 priority = 940
161161
=== modified file 'ibid/plugins/strings.py'
--- ibid/plugins/strings.py 2010-03-01 15:13:45 +0000
+++ ibid/plugins/strings.py 2010-03-27 17:38:22 +0000
@@ -18,7 +18,7 @@
18class Hash(Processor):18class Hash(Processor):
19 usage = u"""(md5|sha1|sha224|sha256|sha384|sha512) <string>19 usage = u"""(md5|sha1|sha224|sha256|sha384|sha512) <string>
20 crypt <string> <salt>"""20 crypt <string> <salt>"""
21 feature = ('hash',)21 features = ('hash',)
2222
23 @match(r'^(md5|sha1|sha224|sha256|sha384|sha512)(?:sum)?\s+(.+?)$')23 @match(r'^(md5|sha1|sha224|sha256|sha384|sha512)(?:sum)?\s+(.+?)$')
24 def hash(self, event, hash, string):24 def hash(self, event, hash, string):
@@ -35,7 +35,7 @@
35}35}
36class Base64(Processor):36class Base64(Processor):
37 usage = u'base(16|32|64) (encode|decode) <string>'37 usage = u'base(16|32|64) (encode|decode) <string>'
38 feature = ('base64',)38 features = ('base64',)
3939
40 @match(r'^b(?:ase)?(16|32|64)\s*(enc|dec)(?:ode)?\s+(.+?)$')40 @match(r'^b(?:ase)?(16|32|64)\s*(enc|dec)(?:ode)?\s+(.+?)$')
41 def base64(self, event, base, operation, string):41 def base64(self, event, base, operation, string):
@@ -59,7 +59,7 @@
59}59}
60class Rot13(Processor):60class Rot13(Processor):
61 usage = u'rot13 <string>'61 usage = u'rot13 <string>'
62 feature = ('rot13',)62 features = ('rot13',)
6363
64 @match(r'^rot13\s+(.+)$')64 @match(r'^rot13\s+(.+)$')
65 def rot13(self, event, string):65 def rot13(self, event, string):
@@ -72,7 +72,7 @@
72}72}
73class Dvorak(Processor):73class Dvorak(Processor):
74 usage = u"""(aoeu|asdf) <text>"""74 usage = u"""(aoeu|asdf) <text>"""
75 feature = ('dvorak',)75 features = ('dvorak',)
7676
77 # List of characters on each keyboard layout77 # List of characters on each keyboard layout
78 dvormap = u"""',.pyfgcrl/=aoeuidhtns-;qjkxbmwvz"<>PYFGCRL?+AOEUIDHTNS_:QJKXBMWVZ[]{}|"""78 dvormap = u"""',.pyfgcrl/=aoeuidhtns-;qjkxbmwvz"<>PYFGCRL?+AOEUIDHTNS_:QJKXBMWVZ[]{}|"""
@@ -98,7 +98,7 @@
98}98}
99class ReTest(Processor):99class ReTest(Processor):
100 usage = u'does <pattern> match <string>'100 usage = u'does <pattern> match <string>'
101 feature = ('retest',)101 features = ('retest',)
102 permission = 'regex'102 permission = 'regex'
103103
104 @match('^does\s+(.+?)\s+match\s+(.+?)$')104 @match('^does\s+(.+?)\s+match\s+(.+?)$')
@@ -112,7 +112,7 @@
112}112}
113class Morse(Processor):113class Morse(Processor):
114 usage = u'morse (text|morsecode)'114 usage = u'morse (text|morsecode)'
115 feature = ('morse',)115 features = ('morse',)
116116
117 _table = {117 _table = {
118 'A': ".-",118 'A': ".-",
119119
=== modified file 'ibid/plugins/svn.py'
--- ibid/plugins/svn.py 2010-02-21 09:45:01 +0000
+++ ibid/plugins/svn.py 2010-03-27 17:38:22 +0000
@@ -393,7 +393,7 @@
393 usage = u"""(last commit|commit <revno>) [to <repo>] [full]393 usage = u"""(last commit|commit <revno>) [to <repo>] [full]
394 (svnrepos|svnrepositories)394 (svnrepos|svnrepositories)
395 """395 """
396 feature = ('svn',)396 features = ('svn',)
397 autoload = False397 autoload = False
398398
399 permission = u'svn'399 permission = u'svn'
400400
=== modified file 'ibid/plugins/sysadmin.py'
--- ibid/plugins/sysadmin.py 2010-03-07 18:32:23 +0000
+++ ibid/plugins/sysadmin.py 2010-03-27 17:38:22 +0000
@@ -17,7 +17,7 @@
17}17}
18class Aptitude(Processor):18class Aptitude(Processor):
19 usage = u'apt (search|show) <term>'19 usage = u'apt (search|show) <term>'
20 feature = ('aptitude',)20 features = ('aptitude',)
2121
22 aptitude = Option('aptitude', 'Path to aptitude executable', 'aptitude')22 aptitude = Option('aptitude', 'Path to aptitude executable', 'aptitude')
2323
@@ -120,7 +120,7 @@
120}120}
121class AptFile(Processor):121class AptFile(Processor):
122 usage = u'apt-file [search] <term>'122 usage = u'apt-file [search] <term>'
123 feature = ('apt-file',)123 features = ('apt-file',)
124124
125 aptfile = Option('apt-file', 'Path to apt-file executable', 'apt-file')125 aptfile = Option('apt-file', 'Path to apt-file executable', 'apt-file')
126126
@@ -159,7 +159,7 @@
159}159}
160class Man(Processor):160class Man(Processor):
161 usage = u'man [<section>] <page>'161 usage = u'man [<section>] <page>'
162 feature = ('man',)162 features = ('man',)
163163
164 man = Option('man', 'Path of the man executable', 'man')164 man = Option('man', 'Path of the man executable', 'man')
165165
@@ -202,7 +202,7 @@
202}202}
203class Mac(Processor):203class Mac(Processor):
204 usage = u'mac <address>'204 usage = u'mac <address>'
205 feature = ('mac',)205 features = ('mac',)
206206
207 @match(r'^((?:mac|oui|ether(?:net)?(?:\s*code)?)\s+)?((?:(?:[0-9a-f]{2}(?(1)[:-]?|:))){2,5}[0-9a-f]{2})$')207 @match(r'^((?:mac|oui|ether(?:net)?(?:\s*code)?)\s+)?((?:(?:[0-9a-f]{2}(?(1)[:-]?|:))){2,5}[0-9a-f]{2})$')
208 def lookup_mac(self, event, _, mac):208 def lookup_mac(self, event, _, mac):
209209
=== modified file 'ibid/plugins/test.py'
--- ibid/plugins/test.py 2010-02-20 21:58:38 +0000
+++ ibid/plugins/test.py 2010-03-27 17:38:22 +0000
@@ -18,7 +18,7 @@
18 raise exception18 raise exception
19 topic <topic>19 topic <topic>
20 """20 """
21 feature = ('test',)21 features = ('test',)
22 permission = u'debug'22 permission = u'debug'
2323
24 @match(r'^delay\s+(\d+\.?\d*)$')24 @match(r'^delay\s+(\d+\.?\d*)$')
2525
=== modified file 'ibid/plugins/trac.py'
--- ibid/plugins/trac.py 2010-02-20 21:58:38 +0000
+++ ibid/plugins/trac.py 2010-03-27 17:38:22 +0000
@@ -30,7 +30,7 @@
30class Tickets(Processor, RPC):30class Tickets(Processor, RPC):
31 usage = u"""ticket <number>31 usage = u"""ticket <number>
32 (open|my|<who>'s) tickets"""32 (open|my|<who>'s) tickets"""
33 feature = ('trac',)33 features = ('trac',)
34 autoload = 'trac' in ibid.databases34 autoload = 'trac' in ibid.databases
3535
36 url = Option('url', 'URL of Trac instance')36 url = Option('url', 'URL of Trac instance')
3737
=== modified file 'ibid/plugins/urlinfo.py'
--- ibid/plugins/urlinfo.py 2010-02-20 21:58:38 +0000
+++ ibid/plugins/urlinfo.py 2010-03-27 17:38:22 +0000
@@ -26,7 +26,7 @@
26}26}
27class Shorten(Processor):27class Shorten(Processor):
28 usage = u'shorten <url>'28 usage = u'shorten <url>'
29 feature = ('tinyurl',)29 features = ('tinyurl',)
3030
31 @match(r'^shorten\s+(\S+\.\S+)$')31 @match(r'^shorten\s+(\S+\.\S+)$')
32 def shorten(self, event, url):32 def shorten(self, event, url):
@@ -44,7 +44,7 @@
44class Lengthen(Processor):44class Lengthen(Processor):
45 usage = u"""<url>45 usage = u"""<url>
46 expand <url>"""46 expand <url>"""
47 feature = ('tinyurl',)47 features = ('tinyurl',)
4848
49 services = ListOption('services', 'List of URL prefixes of URL shortening services', (49 services = ListOption('services', 'List of URL prefixes of URL shortening services', (
50 'http://is.gd/', 'http://tinyurl.com/', 'http://ff.im/',50 'http://is.gd/', 'http://tinyurl.com/', 'http://ff.im/',
@@ -81,7 +81,7 @@
81class Youtube(Processor):81class Youtube(Processor):
82 usage = u'<Youtube URL>'82 usage = u'<Youtube URL>'
8383
84 feature = ('youtube',)84 features = ('youtube',)
8585
86 @match(r'^(?:youtube(?:\.com)?\s+)?'86 @match(r'^(?:youtube(?:\.com)?\s+)?'
87 r'(?:http://)?(?:\w+\.)?youtube\.com/'87 r'(?:http://)?(?:\w+\.)?youtube\.com/'

Subscribers

People subscribed via source and target branches