Merge lp:~stefanor/ibid/rename-feature-attr into lp:~ibid-core/ibid/old-trunk-1.6
- rename-feature-attr
- Merge into 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 | ||||
Related bugs: |
|
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 : | # |
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
1 | === modified file 'docs/api/ibid.plugins.rst' | |||
2 | --- docs/api/ibid.plugins.rst 2010-03-02 20:37:03 +0000 | |||
3 | +++ docs/api/ibid.plugins.rst 2010-03-27 17:38:22 +0000 | |||
4 | @@ -31,7 +31,7 @@ | |||
5 | 31 | 31 | ||
6 | 32 | Default: ``None`` | 32 | Default: ``None`` |
7 | 33 | 33 | ||
9 | 34 | .. attribute:: feature | 34 | .. attribute:: features |
10 | 35 | 35 | ||
11 | 36 | List: Strings naming each feature that this Processor is part of. | 36 | List: Strings naming each feature that this Processor is part of. |
12 | 37 | Used in locating "usage" strings for on-line documentation. | 37 | Used in locating "usage" strings for on-line documentation. |
13 | 38 | 38 | ||
14 | === modified file 'docs/tutorial.rst' | |||
15 | --- docs/tutorial.rst 2010-03-02 20:51:25 +0000 | |||
16 | +++ docs/tutorial.rst 2010-03-27 17:38:22 +0000 | |||
17 | @@ -247,7 +247,7 @@ | |||
18 | 247 | class Dice(Processor): | 247 | class Dice(Processor): |
19 | 248 | usage = u'roll <number> dice' | 248 | usage = u'roll <number> dice' |
20 | 249 | 249 | ||
22 | 250 | feature = ('dice',) | 250 | features = ('dice',) |
23 | 251 | 251 | ||
24 | 252 | @match(r'^roll\s+(\d+)\s+dic?e$') | 252 | @match(r'^roll\s+(\d+)\s+dic?e$') |
25 | 253 | def multithrow(self, event, number): | 253 | def multithrow(self, event, number): |
26 | @@ -262,7 +262,7 @@ | |||
27 | 262 | and if necessary add a category to it from your module. | 262 | and if necessary add a category to it from your module. |
28 | 263 | 263 | ||
29 | 264 | The Processor can be linked to a feature by specifying it in the | 264 | The Processor can be linked to a feature by specifying it in the |
31 | 265 | `feature` attribute. | 265 | `features` attribute. |
32 | 266 | Usage for the Processor's functions (in BNF) goes in a `usage` | 266 | Usage for the Processor's functions (in BNF) goes in a `usage` |
33 | 267 | attribute. | 267 | attribute. |
34 | 268 | "reload tutorial" and you should see "dice" appear in the features for | 268 | "reload tutorial" and you should see "dice" appear in the features for |
35 | 269 | 269 | ||
36 | === modified file 'ibid/plugins/__init__.py' | |||
37 | --- ibid/plugins/__init__.py 2010-03-23 15:21:27 +0000 | |||
38 | +++ ibid/plugins/__init__.py 2010-03-27 17:38:22 +0000 | |||
39 | @@ -259,7 +259,7 @@ | |||
40 | 259 | isLeaf = True | 259 | isLeaf = True |
41 | 260 | 260 | ||
42 | 261 | def __init__(self): | 261 | def __init__(self): |
44 | 262 | ibid.rpc[self.feature[0]] = self | 262 | ibid.rpc[self.features[0]] = self |
45 | 263 | self.form = templates.get_template('plugin_form.html') | 263 | self.form = templates.get_template('plugin_form.html') |
46 | 264 | self.list = templates.get_template('plugin_functions.html') | 264 | self.list = templates.get_template('plugin_functions.html') |
47 | 265 | 265 | ||
48 | @@ -306,7 +306,7 @@ | |||
49 | 306 | if name.startswith('remote_'): | 306 | if name.startswith('remote_'): |
50 | 307 | functions.append(name.replace('remote_', '', 1)) | 307 | functions.append(name.replace('remote_', '', 1)) |
51 | 308 | 308 | ||
53 | 309 | return self.list.render(object=self.feature[0], functions=functions) \ | 309 | return self.list.render(object=self.features[0], functions=functions) \ |
54 | 310 | .encode('utf-8') | 310 | .encode('utf-8') |
55 | 311 | 311 | ||
56 | 312 | args, varargs, varkw, defaults = getargspec(function) | 312 | args, varargs, varkw, defaults = getargspec(function) |
57 | 313 | 313 | ||
58 | === modified file 'ibid/plugins/admin.py' | |||
59 | --- ibid/plugins/admin.py 2010-02-20 21:58:38 +0000 | |||
60 | +++ ibid/plugins/admin.py 2010-03-27 17:38:22 +0000 | |||
61 | @@ -21,7 +21,7 @@ | |||
62 | 21 | } | 21 | } |
63 | 22 | class ListPLugins(Processor): | 22 | class ListPLugins(Processor): |
64 | 23 | usage = u'list plugins' | 23 | usage = u'list plugins' |
66 | 24 | feature = ('plugins',) | 24 | features = ('plugins',) |
67 | 25 | 25 | ||
68 | 26 | @match(r'^lsmod|list\s+plugins$') | 26 | @match(r'^lsmod|list\s+plugins$') |
69 | 27 | def handler(self, event): | 27 | def handler(self, event): |
70 | @@ -38,7 +38,7 @@ | |||
71 | 38 | } | 38 | } |
72 | 39 | class ReloadCoreModules(Processor): | 39 | class ReloadCoreModules(Processor): |
73 | 40 | usage = u'reload (reloader|dispatcher|databases|auth)' | 40 | usage = u'reload (reloader|dispatcher|databases|auth)' |
75 | 41 | feature = ('core',) | 41 | features = ('core',) |
76 | 42 | 42 | ||
77 | 43 | priority = -5 | 43 | priority = -5 |
78 | 44 | permission = u'core' | 44 | permission = u'core' |
79 | @@ -56,7 +56,7 @@ | |||
80 | 56 | 56 | ||
81 | 57 | class LoadModules(Processor): | 57 | class LoadModules(Processor): |
82 | 58 | usage = u'(load|unload|reload) <plugin|processor>' | 58 | usage = u'(load|unload|reload) <plugin|processor>' |
84 | 59 | feature = ('plugins',) | 59 | features = ('plugins',) |
85 | 60 | 60 | ||
86 | 61 | permission = u'plugins' | 61 | permission = u'plugins' |
87 | 62 | 62 | ||
88 | @@ -79,7 +79,7 @@ | |||
89 | 79 | } | 79 | } |
90 | 80 | class Die(Processor): | 80 | class Die(Processor): |
91 | 81 | usage = u'die' | 81 | usage = u'die' |
93 | 82 | feature = ('die',) | 82 | features = ('die',) |
94 | 83 | 83 | ||
95 | 84 | permission = u'admin' | 84 | permission = u'admin' |
96 | 85 | 85 | ||
97 | @@ -95,7 +95,7 @@ | |||
98 | 95 | class Admin(Processor): | 95 | class Admin(Processor): |
99 | 96 | usage = u"""(connect|disconnect) (to|from) <source> | 96 | usage = u"""(connect|disconnect) (to|from) <source> |
100 | 97 | load <source> source""" | 97 | load <source> source""" |
102 | 98 | feature = ('sources',) | 98 | features = ('sources',) |
103 | 99 | 99 | ||
104 | 100 | permission = u'sources' | 100 | permission = u'sources' |
105 | 101 | 101 | ||
106 | @@ -129,7 +129,7 @@ | |||
107 | 129 | 129 | ||
108 | 130 | class Info(Processor): | 130 | class Info(Processor): |
109 | 131 | usage = u'(sources|list configured sources)' | 131 | usage = u'(sources|list configured sources)' |
111 | 132 | feature = ('sources',) | 132 | features = ('sources',) |
112 | 133 | 133 | ||
113 | 134 | @match(r'^sources$') | 134 | @match(r'^sources$') |
114 | 135 | def list(self, event): | 135 | def list(self, event): |
115 | @@ -149,7 +149,7 @@ | |||
116 | 149 | } | 149 | } |
117 | 150 | class Version(Processor): | 150 | class Version(Processor): |
118 | 151 | usage = u'version' | 151 | usage = u'version' |
120 | 152 | feature = ('version',) | 152 | features = ('version',) |
121 | 153 | 153 | ||
122 | 154 | @match(r'^version$') | 154 | @match(r'^version$') |
123 | 155 | def show_version(self, event): | 155 | def show_version(self, event): |
124 | @@ -167,7 +167,7 @@ | |||
125 | 167 | usage = u"""reread config | 167 | usage = u"""reread config |
126 | 168 | set config <name> to <value> | 168 | set config <name> to <value> |
127 | 169 | get config <name>""" | 169 | get config <name>""" |
129 | 170 | feature = ('config',) | 170 | features = ('config',) |
130 | 171 | 171 | ||
131 | 172 | priority = -10 | 172 | priority = -10 |
132 | 173 | permission = u'config' | 173 | permission = u'config' |
133 | 174 | 174 | ||
134 | === modified file 'ibid/plugins/ascii.py' | |||
135 | --- ibid/plugins/ascii.py 2010-02-20 21:58:38 +0000 | |||
136 | +++ ibid/plugins/ascii.py 2010-03-27 17:38:22 +0000 | |||
137 | @@ -35,7 +35,7 @@ | |||
138 | 35 | } | 35 | } |
139 | 36 | class DrawImage(Processor): | 36 | class DrawImage(Processor): |
140 | 37 | usage = u'draw <url> [in colour] [width <width>] [height <height>]' | 37 | usage = u'draw <url> [in colour] [width <width>] [height <height>]' |
142 | 38 | feature = ('draw-aa',) | 38 | features = ('draw-aa',) |
143 | 39 | 39 | ||
144 | 40 | max_filesize = IntOption('max_filesize', 'Only request this many KiB', 200) | 40 | max_filesize = IntOption('max_filesize', 'Only request this many KiB', 200) |
145 | 41 | def_height = IntOption('def_height', 'Default height for libaa output', 10) | 41 | def_height = IntOption('def_height', 'Default height for libaa output', 10) |
146 | @@ -153,7 +153,7 @@ | |||
147 | 153 | class WriteFiglet(Processor): | 153 | class WriteFiglet(Processor): |
148 | 154 | usage = u"""figlet <text> [in <font>] | 154 | usage = u"""figlet <text> [in <font>] |
149 | 155 | list figlet fonts [from <index>]""" | 155 | list figlet fonts [from <index>]""" |
151 | 156 | feature = ('figlet',) | 156 | features = ('figlet',) |
152 | 157 | 157 | ||
153 | 158 | max_width = IntOption('max_width', 'Maximum width for ascii output', 60) | 158 | max_width = IntOption('max_width', 'Maximum width for ascii output', 60) |
154 | 159 | fonts_ = Option('fonts', 'Directory or Zip file containing figlet fonts', | 159 | fonts_ = Option('fonts', 'Directory or Zip file containing figlet fonts', |
155 | 160 | 160 | ||
156 | === modified file 'ibid/plugins/buildbot.py' | |||
157 | --- ibid/plugins/buildbot.py 2010-02-20 21:58:38 +0000 | |||
158 | +++ ibid/plugins/buildbot.py 2010-03-27 17:38:22 +0000 | |||
159 | @@ -15,7 +15,7 @@ | |||
160 | 15 | }} | 15 | }} |
161 | 16 | class BuildBot(Processor, RPC): | 16 | class BuildBot(Processor, RPC): |
162 | 17 | usage = u'rebuild <branch> [ (revision|r) <number> ]' | 17 | usage = u'rebuild <branch> [ (revision|r) <number> ]' |
164 | 18 | feature = ('buildbot',) | 18 | features = ('buildbot',) |
165 | 19 | autoload = False | 19 | autoload = False |
166 | 20 | 20 | ||
167 | 21 | server = Option('server', 'Buildbot server hostname', 'localhost') | 21 | server = Option('server', 'Buildbot server hostname', 'localhost') |
168 | 22 | 22 | ||
169 | === modified file 'ibid/plugins/bzr.py' | |||
170 | --- ibid/plugins/bzr.py 2010-02-21 09:45:01 +0000 | |||
171 | +++ ibid/plugins/bzr.py 2010-03-27 17:38:22 +0000 | |||
172 | @@ -62,7 +62,7 @@ | |||
173 | 62 | class Bazaar(Processor, RPC): | 62 | class Bazaar(Processor, RPC): |
174 | 63 | usage = u"""(last commit|commit <revno>) [to <repo>] [full] | 63 | usage = u"""(last commit|commit <revno>) [to <repo>] [full] |
175 | 64 | repositories""" | 64 | repositories""" |
177 | 65 | feature = ('bzr',) | 65 | features = ('bzr',) |
178 | 66 | autoload = False | 66 | autoload = False |
179 | 67 | 67 | ||
180 | 68 | repositories = DictOption('repositories', 'Dict of repositories names and URLs') | 68 | repositories = DictOption('repositories', 'Dict of repositories names and URLs') |
181 | 69 | 69 | ||
182 | === modified file 'ibid/plugins/calc.py' | |||
183 | --- ibid/plugins/calc.py 2010-02-24 12:55:40 +0000 | |||
184 | +++ ibid/plugins/calc.py 2010-03-27 17:38:22 +0000 | |||
185 | @@ -37,7 +37,7 @@ | |||
186 | 37 | class BC(Processor): | 37 | class BC(Processor): |
187 | 38 | usage = u'bc <expression>' | 38 | usage = u'bc <expression>' |
188 | 39 | 39 | ||
190 | 40 | feature = ('bc',) | 40 | features = ('bc',) |
191 | 41 | 41 | ||
192 | 42 | bc = Option('bc', 'Path to bc executable', 'bc') | 42 | bc = Option('bc', 'Path to bc executable', 'bc') |
193 | 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) |
194 | @@ -141,7 +141,7 @@ | |||
195 | 141 | 141 | ||
196 | 142 | class Calc(Processor): | 142 | class Calc(Processor): |
197 | 143 | usage = u'<expression>' | 143 | usage = u'<expression>' |
199 | 144 | feature = ('calc',) | 144 | features = ('calc',) |
200 | 145 | 145 | ||
201 | 146 | priority = 500 | 146 | priority = 500 |
202 | 147 | 147 | ||
203 | @@ -212,7 +212,7 @@ | |||
204 | 212 | } | 212 | } |
205 | 213 | class Random(Processor): | 213 | class Random(Processor): |
206 | 214 | usage = u'random [ <max> | <min> <max> ]' | 214 | usage = u'random [ <max> | <min> <max> ]' |
208 | 215 | feature = ('random',) | 215 | features = ('random',) |
209 | 216 | 216 | ||
210 | 217 | @match('^rand(?:om)?(?:\s+(\d+)(?:\s+(\d+))?)?$') | 217 | @match('^rand(?:om)?(?:\s+(\d+)(?:\s+(\d+))?)?$') |
211 | 218 | def random(self, event, begin, end): | 218 | def random(self, event, begin, end): |
212 | 219 | 219 | ||
213 | === modified file 'ibid/plugins/codecontest.py' | |||
214 | --- ibid/plugins/codecontest.py 2010-02-20 21:58:38 +0000 | |||
215 | +++ ibid/plugins/codecontest.py 2010-03-27 17:38:22 +0000 | |||
216 | @@ -38,7 +38,7 @@ | |||
217 | 38 | admin_user = Option('admin_user', 'Admin user on USACO', None) | 38 | admin_user = Option('admin_user', 'Admin user on USACO', None) |
218 | 39 | admin_password = Option('admin_password', 'Admin password on USACO', None) | 39 | admin_password = Option('admin_password', 'Admin password on USACO', None) |
219 | 40 | 40 | ||
221 | 41 | feature = ('usaco',) | 41 | features = ('usaco',) |
222 | 42 | # Clashes with identity, so lower our priority since if we match, then | 42 | # Clashes with identity, so lower our priority since if we match, then |
223 | 43 | # this is the better match | 43 | # this is the better match |
224 | 44 | priority = -20 | 44 | priority = -20 |
225 | 45 | 45 | ||
226 | === modified file 'ibid/plugins/conversions.py' | |||
227 | --- ibid/plugins/conversions.py 2010-03-20 11:27:28 +0000 | |||
228 | +++ ibid/plugins/conversions.py 2010-03-27 17:38:22 +0000 | |||
229 | @@ -9,6 +9,7 @@ | |||
230 | 9 | 9 | ||
231 | 10 | import ibid | 10 | import ibid |
232 | 11 | from ibid.plugins import Processor, handler, match | 11 | from ibid.plugins import Processor, handler, match |
233 | 12 | from ibid.compat import any | ||
234 | 12 | from ibid.config import Option | 13 | from ibid.config import Option |
235 | 13 | from ibid.utils import file_in_path, get_country_codes, human_join, \ | 14 | from ibid.utils import file_in_path, get_country_codes, human_join, \ |
236 | 14 | unicode_output | 15 | unicode_output |
237 | @@ -26,7 +27,7 @@ | |||
238 | 26 | [convert] ascii <text> to base <number> | 27 | [convert] ascii <text> to base <number> |
239 | 27 | [convert] <sequence> from base <number> to ascii""" | 28 | [convert] <sequence> from base <number> to ascii""" |
240 | 28 | 29 | ||
242 | 29 | feature = ('base',) | 30 | features = ('base',) |
243 | 30 | 31 | ||
244 | 31 | abbr_named_bases = { | 32 | abbr_named_bases = { |
245 | 32 | "hex": 16, | 33 | "hex": 16, |
246 | @@ -173,7 +174,8 @@ | |||
247 | 173 | 'base': self._base_name(base_to), | 174 | 'base': self._base_name(base_to), |
248 | 174 | }) | 175 | }) |
249 | 175 | 176 | ||
251 | 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 |
252 | 178 | if 'base64' in getattr(plugin, 'features', [])): | ||
253 | 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') |
254 | 178 | 180 | ||
255 | 179 | @handler | 181 | @handler |
256 | @@ -213,7 +215,8 @@ | |||
257 | 213 | return | 215 | return |
258 | 214 | 216 | ||
259 | 215 | event.addresponse(u'That is "%s"', output) | 217 | event.addresponse(u'That is "%s"', output) |
261 | 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 |
262 | 219 | if 'base64' in getattr(plugin, 'features', [])): | ||
263 | 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') |
264 | 218 | 221 | ||
265 | 219 | features['units'] = { | 222 | features['units'] = { |
266 | @@ -222,7 +225,7 @@ | |||
267 | 222 | } | 225 | } |
268 | 223 | class Units(Processor): | 226 | class Units(Processor): |
269 | 224 | usage = u'convert [<value>] <unit> to <unit>' | 227 | usage = u'convert [<value>] <unit> to <unit>' |
271 | 225 | feature = ('units',) | 228 | features = ('units',) |
272 | 226 | priority = 10 | 229 | priority = 10 |
273 | 227 | 230 | ||
274 | 228 | units = Option('units', 'Path to units executable', 'units') | 231 | units = Option('units', 'Path to units executable', 'units') |
275 | @@ -303,7 +306,7 @@ | |||
276 | 303 | usage = u"""exchange <amount> <currency> for <currency> | 306 | usage = u"""exchange <amount> <currency> for <currency> |
277 | 304 | currencies for <country>""" | 307 | currencies for <country>""" |
278 | 305 | 308 | ||
280 | 306 | feature = ('currency',) | 309 | features = ('currency',) |
281 | 307 | 310 | ||
282 | 308 | headers = {'User-Agent': 'Mozilla/5.0', 'Referer': 'http://www.xe.com/'} | 311 | headers = {'User-Agent': 'Mozilla/5.0', 'Referer': 'http://www.xe.com/'} |
283 | 309 | currencies = {} | 312 | currencies = {} |
284 | @@ -433,7 +436,7 @@ | |||
285 | 433 | usage = u"""U+<hex code> | 436 | usage = u"""U+<hex code> |
286 | 434 | unicode (<character>|<character name>|<decimal code>|0x<hex code>)""" | 437 | unicode (<character>|<character name>|<decimal code>|0x<hex code>)""" |
287 | 435 | 438 | ||
289 | 436 | feature = ('unicode',) | 439 | features = ('unicode',) |
290 | 437 | 440 | ||
291 | 438 | bidis = {'AL': u'right-to-left Arabic', 'AN': u'Arabic number', | 441 | bidis = {'AL': u'right-to-left Arabic', 'AN': u'Arabic number', |
292 | 439 | 'B': u'paragraph separator', 'BN': u'boundary neutral', | 442 | 'B': u'paragraph separator', 'BN': u'boundary neutral', |
293 | 440 | 443 | ||
294 | === modified file 'ibid/plugins/eval.py' | |||
295 | --- ibid/plugins/eval.py 2010-02-20 21:58:38 +0000 | |||
296 | +++ ibid/plugins/eval.py 2010-03-27 17:38:22 +0000 | |||
297 | @@ -20,7 +20,7 @@ | |||
298 | 20 | 20 | ||
299 | 21 | class Python(Processor): | 21 | class Python(Processor): |
300 | 22 | usage = u'py <code>' | 22 | usage = u'py <code>' |
302 | 23 | feature = ('eval',) | 23 | features = ('eval',) |
303 | 24 | 24 | ||
304 | 25 | permission = u'eval' | 25 | permission = u'eval' |
305 | 26 | 26 | ||
306 | @@ -40,7 +40,7 @@ | |||
307 | 40 | 40 | ||
308 | 41 | class Perl(Processor): | 41 | class Perl(Processor): |
309 | 42 | usage = u'pl <code>' | 42 | usage = u'pl <code>' |
311 | 43 | feature = ('eval',) | 43 | features = ('eval',) |
312 | 44 | 44 | ||
313 | 45 | permission = u'eval' | 45 | permission = u'eval' |
314 | 46 | 46 | ||
315 | @@ -56,7 +56,7 @@ | |||
316 | 56 | 56 | ||
317 | 57 | class Lua(Processor): | 57 | class Lua(Processor): |
318 | 58 | usage = u'lua <code>' | 58 | usage = u'lua <code>' |
320 | 59 | feature = ('eval',) | 59 | features = ('eval',) |
321 | 60 | 60 | ||
322 | 61 | permission = u'eval' | 61 | permission = u'eval' |
323 | 62 | 62 | ||
324 | 63 | 63 | ||
325 | === modified file 'ibid/plugins/factoid.py' | |||
326 | --- ibid/plugins/factoid.py 2010-02-24 12:42:45 +0000 | |||
327 | +++ ibid/plugins/factoid.py 2010-03-27 17:38:22 +0000 | |||
328 | @@ -267,7 +267,7 @@ | |||
329 | 267 | 267 | ||
330 | 268 | class Utils(Processor): | 268 | class Utils(Processor): |
331 | 269 | usage = u'literal <name> [( #<from number> | /<pattern>/[r] )]' | 269 | usage = u'literal <name> [( #<from number> | /<pattern>/[r] )]' |
333 | 270 | feature = ('factoid',) | 270 | features = ('factoid',) |
334 | 271 | 271 | ||
335 | 272 | @match(r'^literal\s+(.+?)(?:\s+#(\d+)|\s+(?:/(.+?)/(r?)))?$') | 272 | @match(r'^literal\s+(.+?)(?:\s+#(\d+)|\s+(?:/(.+?)/(r?)))?$') |
336 | 273 | def literal(self, event, name, number, pattern, is_regex): | 273 | def literal(self, event, name, number, pattern, is_regex): |
337 | @@ -282,7 +282,7 @@ | |||
338 | 282 | class Forget(Processor): | 282 | class Forget(Processor): |
339 | 283 | usage = u"""forget <name> [( #<number> | /<pattern>/[r] )] | 283 | usage = u"""forget <name> [( #<number> | /<pattern>/[r] )] |
340 | 284 | <name> is the same as <other name>""" | 284 | <name> is the same as <other name>""" |
342 | 285 | feature = ('factoid',) | 285 | features = ('factoid',) |
343 | 286 | 286 | ||
344 | 287 | priority = 10 | 287 | priority = 10 |
345 | 288 | permission = u'factoid' | 288 | permission = u'factoid' |
346 | @@ -378,7 +378,7 @@ | |||
347 | 378 | 378 | ||
348 | 379 | class Search(Processor): | 379 | class Search(Processor): |
349 | 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>]' |
351 | 381 | feature = ('factoid',) | 381 | features = ('factoid',) |
352 | 382 | 382 | ||
353 | 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) |
354 | 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) |
355 | @@ -453,7 +453,7 @@ | |||
356 | 453 | 453 | ||
357 | 454 | class Get(Processor, RPC): | 454 | class Get(Processor, RPC): |
358 | 455 | usage = u'<factoid> [( #<number> | /<pattern>/[r] )]' | 455 | usage = u'<factoid> [( #<number> | /<pattern>/[r] )]' |
360 | 456 | feature = ('factoid',) | 456 | features = ('factoid',) |
361 | 457 | 457 | ||
362 | 458 | priority = 200 | 458 | priority = 200 |
363 | 459 | 459 | ||
364 | @@ -505,7 +505,7 @@ | |||
365 | 505 | class Set(Processor): | 505 | class Set(Processor): |
366 | 506 | usage = u"""<name> (<verb>|=<verb>=) [also] <value> | 506 | usage = u"""<name> (<verb>|=<verb>=) [also] <value> |
367 | 507 | last set factoid""" | 507 | last set factoid""" |
369 | 508 | feature = ('factoid',) | 508 | features = ('factoid',) |
370 | 509 | 509 | ||
371 | 510 | interrogatives = ListOption('interrogatives', 'Question words to strip', default_interrogatives) | 510 | interrogatives = ListOption('interrogatives', 'Question words to strip', default_interrogatives) |
372 | 511 | verbs = ListOption('verbs', 'Verbs that split name from value', default_verbs) | 511 | verbs = ListOption('verbs', 'Verbs that split name from value', default_verbs) |
373 | @@ -583,7 +583,7 @@ | |||
374 | 583 | class Modify(Processor): | 583 | class Modify(Processor): |
375 | 584 | usage = u"""<name> [( #<number> | /<pattern>/[r] )] += <suffix> | 584 | usage = u"""<name> [( #<number> | /<pattern>/[r] )] += <suffix> |
376 | 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>/ )""" |
378 | 586 | feature = ('factoid',) | 586 | features = ('factoid',) |
379 | 587 | 587 | ||
380 | 588 | permission = u'factoid' | 588 | permission = u'factoid' |
381 | 589 | permissions = (u'factoidadmin',) | 589 | permissions = (u'factoidadmin',) |
382 | 590 | 590 | ||
383 | === modified file 'ibid/plugins/feeds.py' | |||
384 | --- ibid/plugins/feeds.py 2010-02-20 21:58:38 +0000 | |||
385 | +++ ibid/plugins/feeds.py 2010-03-27 17:38:22 +0000 | |||
386 | @@ -103,7 +103,7 @@ | |||
387 | 103 | poll <name> feed notify <channel> on <source> | 103 | poll <name> feed notify <channel> on <source> |
388 | 104 | stop polling <name> feed | 104 | stop polling <name> feed |
389 | 105 | """ | 105 | """ |
391 | 106 | feature = ('feeds',) | 106 | features = ('feeds',) |
392 | 107 | 107 | ||
393 | 108 | permission = u'feeds' | 108 | permission = u'feeds' |
394 | 109 | 109 | ||
395 | @@ -208,7 +208,7 @@ | |||
396 | 208 | class Retrieve(Processor): | 208 | class Retrieve(Processor): |
397 | 209 | usage = u"""latest [ <count> ] articles from <name> [ starting at <number> ] | 209 | usage = u"""latest [ <count> ] articles from <name> [ starting at <number> ] |
398 | 210 | article ( <number> | /<pattern>/ ) from <name>""" | 210 | article ( <number> | /<pattern>/ ) from <name>""" |
400 | 211 | feature = ('feeds',) | 211 | features = ('feeds',) |
401 | 212 | 212 | ||
402 | 213 | interval = IntOption('interval', 'Feed Poll interval (in seconds)', 300) | 213 | interval = IntOption('interval', 'Feed Poll interval (in seconds)', 300) |
403 | 214 | 214 | ||
404 | 215 | 215 | ||
405 | === modified file 'ibid/plugins/film.py' | |||
406 | --- ibid/plugins/film.py 2010-03-08 15:51:53 +0000 | |||
407 | +++ ibid/plugins/film.py 2010-03-27 17:38:22 +0000 | |||
408 | @@ -26,7 +26,7 @@ | |||
409 | 26 | class TVShow(Processor): | 26 | class TVShow(Processor): |
410 | 27 | usage = u'tvshow <show>' | 27 | usage = u'tvshow <show>' |
411 | 28 | 28 | ||
413 | 29 | feature = ('tvshow',) | 29 | features = ('tvshow',) |
414 | 30 | 30 | ||
415 | 31 | def remote_tvrage(self, show): | 31 | def remote_tvrage(self, show): |
416 | 32 | info_url = 'http://services.tvrage.com/tools/quickinfo.php?%s' | 32 | info_url = 'http://services.tvrage.com/tools/quickinfo.php?%s' |
417 | @@ -88,7 +88,7 @@ | |||
418 | 88 | } | 88 | } |
419 | 89 | class IMDB(Processor): | 89 | class IMDB(Processor): |
420 | 90 | usage = u'imdb [search] [character|company|episode|movie|person] <terms> [#<index>]' | 90 | usage = u'imdb [search] [character|company|episode|movie|person] <terms> [#<index>]' |
422 | 91 | feature = ('imdb',) | 91 | features = ('imdb',) |
423 | 92 | 92 | ||
424 | 93 | access_system = Option("accesssystem", "Method of querying IMDB", "http") | 93 | access_system = Option("accesssystem", "Method of querying IMDB", "http") |
425 | 94 | adult_search = BoolOption("adultsearch", "Include adult films in search results", True) | 94 | adult_search = BoolOption("adultsearch", "Include adult films in search results", True) |
426 | 95 | 95 | ||
427 | === modified file 'ibid/plugins/fun.py' | |||
428 | --- ibid/plugins/fun.py 2010-02-20 21:58:38 +0000 | |||
429 | +++ ibid/plugins/fun.py 2010-03-27 17:38:22 +0000 | |||
430 | @@ -20,7 +20,7 @@ | |||
431 | 20 | } | 20 | } |
432 | 21 | class Nickometer(Processor): | 21 | class Nickometer(Processor): |
433 | 22 | usage = u'nickometer [<nick>] [with reasons]' | 22 | usage = u'nickometer [<nick>] [with reasons]' |
435 | 23 | feature = ('nickometer',) | 23 | features = ('nickometer',) |
436 | 24 | 24 | ||
437 | 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)?$') |
438 | 26 | def handle_nickometer(self, event, nick, wreasons): | 26 | def handle_nickometer(self, event, nick, wreasons): |
439 | @@ -45,7 +45,7 @@ | |||
440 | 45 | } | 45 | } |
441 | 46 | class Choose(Processor): | 46 | class Choose(Processor): |
442 | 47 | usage = u'choose <choice> or <choice>...' | 47 | usage = u'choose <choice> or <choice>...' |
444 | 48 | feature = ('choose',) | 48 | features = ('choose',) |
445 | 49 | 49 | ||
446 | 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) |
447 | 51 | 51 | ||
448 | @@ -59,7 +59,7 @@ | |||
449 | 59 | } | 59 | } |
450 | 60 | class Coffee(Processor): | 60 | class Coffee(Processor): |
451 | 61 | usage = u'coffee (on|please)' | 61 | usage = u'coffee (on|please)' |
453 | 62 | feature = ('coffee',) | 62 | features = ('coffee',) |
454 | 63 | 63 | ||
455 | 64 | pots = {} | 64 | pots = {} |
456 | 65 | 65 | ||
457 | @@ -114,7 +114,7 @@ | |||
458 | 114 | class Insult(Processor): | 114 | class Insult(Processor): |
459 | 115 | usage = u"""(flame | insult) <person> | 115 | usage = u"""(flame | insult) <person> |
460 | 116 | (swear | cuss | explete) [at <person>]""" | 116 | (swear | cuss | explete) [at <person>]""" |
462 | 117 | feature = ('insult',) | 117 | features = ('insult',) |
463 | 118 | 118 | ||
464 | 119 | adjectives = ListOption('adjectives', 'List of adjectives', ( | 119 | adjectives = ListOption('adjectives', 'List of adjectives', ( |
465 | 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', |
466 | 121 | 121 | ||
467 | === modified file 'ibid/plugins/games.py' | |||
468 | --- ibid/plugins/games.py 2010-02-20 21:58:38 +0000 | |||
469 | +++ ibid/plugins/games.py 2010-03-27 17:38:22 +0000 | |||
470 | @@ -28,7 +28,7 @@ | |||
471 | 28 | I throw the gauntlet down at <user>'s feet [over <something>] | 28 | I throw the gauntlet down at <user>'s feet [over <something>] |
472 | 29 | """ | 29 | """ |
473 | 30 | 30 | ||
475 | 31 | feature = ('duel',) | 31 | features = ('duel',) |
476 | 32 | 32 | ||
477 | 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) |
478 | 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) |
479 | @@ -219,7 +219,7 @@ | |||
480 | 219 | usage = u"""draw [my <weapon>] | 219 | usage = u"""draw [my <weapon>] |
481 | 220 | bam|pew|bang|kapow|pewpew|holyhandgrenadeofantioch""" | 220 | bam|pew|bang|kapow|pewpew|holyhandgrenadeofantioch""" |
482 | 221 | 221 | ||
484 | 222 | feature = ('duel',) | 222 | features = ('duel',) |
485 | 223 | 223 | ||
486 | 224 | # Parameters for Processor: | 224 | # Parameters for Processor: |
487 | 225 | event_types = (u'message', u'action') | 225 | event_types = (u'message', u'action') |
488 | @@ -402,7 +402,7 @@ | |||
489 | 402 | )), duel.names[shooter], address=False) | 402 | )), duel.names[shooter], address=False) |
490 | 403 | 403 | ||
491 | 404 | class DuelFlee(Processor): | 404 | class DuelFlee(Processor): |
493 | 405 | feature = ('duel',) | 405 | features = ('duel',) |
494 | 406 | addressed = False | 406 | addressed = False |
495 | 407 | event_types = (u'state',) | 407 | event_types = (u'state',) |
496 | 408 | 408 | ||
497 | @@ -461,7 +461,7 @@ | |||
498 | 461 | ( kill | see | eat ) <villager> | 461 | ( kill | see | eat ) <villager> |
499 | 462 | vote for <villager> | 462 | vote for <villager> |
500 | 463 | """ | 463 | """ |
502 | 464 | feature = ('werewolf',) | 464 | features = ('werewolf',) |
503 | 465 | state = None | 465 | state = None |
504 | 466 | 466 | ||
505 | 467 | player_limit = IntOption('min_players', 'The minimum number of players', 5) | 467 | player_limit = IntOption('min_players', 'The minimum number of players', 5) |
506 | @@ -848,7 +848,7 @@ | |||
507 | 848 | return self.state.__name__ | 848 | return self.state.__name__ |
508 | 849 | 849 | ||
509 | 850 | class WerewolfState(Processor): | 850 | class WerewolfState(Processor): |
511 | 851 | feature = ('werewolf',) | 851 | features = ('werewolf',) |
512 | 852 | event_types = (u'state',) | 852 | event_types = (u'state',) |
513 | 853 | 853 | ||
514 | 854 | @handler | 854 | @handler |
515 | 855 | 855 | ||
516 | === modified file 'ibid/plugins/gameservers.py' | |||
517 | --- ibid/plugins/gameservers.py 2010-03-19 12:24:38 +0000 | |||
518 | +++ ibid/plugins/gameservers.py 2010-03-27 17:38:22 +0000 | |||
519 | @@ -16,7 +16,7 @@ | |||
520 | 16 | 16 | ||
521 | 17 | class Bnet(Processor): | 17 | class Bnet(Processor): |
522 | 18 | usage = u'dota players | who is playing dota' | 18 | usage = u'dota players | who is playing dota' |
524 | 19 | feature = ('gameservers',) | 19 | features = ('gameservers',) |
525 | 20 | autoload = False | 20 | autoload = False |
526 | 21 | 21 | ||
527 | 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') |
528 | @@ -54,7 +54,7 @@ | |||
529 | 54 | 54 | ||
530 | 55 | class CounterStrike(Processor): | 55 | class CounterStrike(Processor): |
531 | 56 | usage = u'cs players | who is playing cs' | 56 | usage = u'cs players | who is playing cs' |
533 | 57 | feature = ('gameservers',) | 57 | features = ('gameservers',) |
534 | 58 | autoload = False | 58 | autoload = False |
535 | 59 | 59 | ||
536 | 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') |
537 | 61 | 61 | ||
538 | === modified file 'ibid/plugins/geography.py' | |||
539 | --- ibid/plugins/geography.py 2010-03-22 10:15:49 +0000 | |||
540 | +++ ibid/plugins/geography.py 2010-03-27 17:38:22 +0000 | |||
541 | @@ -37,7 +37,7 @@ | |||
542 | 37 | # http://www.mathforum.com/library/drmath/view/51711.html | 37 | # http://www.mathforum.com/library/drmath/view/51711.html |
543 | 38 | # http://mathworld.wolfram.com/GreatCircle.html | 38 | # http://mathworld.wolfram.com/GreatCircle.html |
544 | 39 | 39 | ||
546 | 40 | feature = ('distance',) | 40 | features = ('distance',) |
547 | 41 | 41 | ||
548 | 42 | default_unit_names = { | 42 | default_unit_names = { |
549 | 43 | 'km': "kilometres", | 43 | 'km': "kilometres", |
550 | @@ -118,7 +118,7 @@ | |||
551 | 118 | usage = u"""weather in <city> | 118 | usage = u"""weather in <city> |
552 | 119 | forecast for <city>""" | 119 | forecast for <city>""" |
553 | 120 | 120 | ||
555 | 121 | feature = ('weather',) | 121 | features = ('weather',) |
556 | 122 | 122 | ||
557 | 123 | defaults = { 'ct': 'Cape Town, South Africa', | 123 | defaults = { 'ct': 'Cape Town, South Africa', |
558 | 124 | 'jhb': 'Johannesburg, South Africa', | 124 | 'jhb': 'Johannesburg, South Africa', |
559 | @@ -236,7 +236,7 @@ | |||
560 | 236 | class TimeZone(Processor): | 236 | class TimeZone(Processor): |
561 | 237 | usage = u"""when is <time> <place|timezone> in <place|timezone> | 237 | usage = u"""when is <time> <place|timezone> in <place|timezone> |
562 | 238 | time in <place|timezone>""" | 238 | time in <place|timezone>""" |
564 | 239 | feature = ('timezone',) | 239 | features = ('timezone',) |
565 | 240 | 240 | ||
566 | 241 | zoneinfo = Option('zoneinfo', 'Timezone info directory', '/usr/share/zoneinfo') | 241 | zoneinfo = Option('zoneinfo', 'Timezone info directory', '/usr/share/zoneinfo') |
567 | 242 | custom_zones = DictOption('timezones', 'Custom timezone names', CUSTOM_ZONES) | 242 | custom_zones = DictOption('timezones', 'Custom timezone names', CUSTOM_ZONES) |
568 | @@ -402,7 +402,7 @@ | |||
569 | 402 | usage = u"""airport [in] <name|location|code> | 402 | usage = u"""airport [in] <name|location|code> |
570 | 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>]""" |
571 | 404 | 404 | ||
573 | 405 | feature = ('flight',) | 405 | features = ('flight',) |
574 | 406 | 406 | ||
575 | 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' |
576 | 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) |
577 | 409 | 409 | ||
578 | === modified file 'ibid/plugins/google.py' | |||
579 | --- ibid/plugins/google.py 2010-03-06 18:18:29 +0000 | |||
580 | +++ ibid/plugins/google.py 2010-03-27 17:38:22 +0000 | |||
581 | @@ -23,7 +23,7 @@ | |||
582 | 23 | usage = u"""google[.<tld>] [for] <term> | 23 | usage = u"""google[.<tld>] [for] <term> |
583 | 24 | googlefight [for] <term> and <term>""" | 24 | googlefight [for] <term> and <term>""" |
584 | 25 | 25 | ||
586 | 26 | feature = ('google',) | 26 | features = ('google',) |
587 | 27 | 27 | ||
588 | 28 | api_key = Option('api_key', 'Your Google API Key (optional)', None) | 28 | api_key = Option('api_key', 'Your Google API Key (optional)', None) |
589 | 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) |
590 | @@ -89,7 +89,7 @@ | |||
591 | 89 | usage = u"""gcalc <expression> | 89 | usage = u"""gcalc <expression> |
592 | 90 | gdefine <term>""" | 90 | gdefine <term>""" |
593 | 91 | 91 | ||
595 | 92 | feature = ('google',) | 92 | features = ('google',) |
596 | 93 | 93 | ||
597 | 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) |
598 | 95 | google_scrape_url = "http://www.google.com/search?q=%s" | 95 | google_scrape_url = "http://www.google.com/search?q=%s" |
599 | 96 | 96 | ||
600 | === modified file 'ibid/plugins/help.py' | |||
601 | --- ibid/plugins/help.py 2010-03-05 15:10:37 +0000 | |||
602 | +++ ibid/plugins/help.py 2010-03-27 17:38:22 +0000 | |||
603 | @@ -31,7 +31,7 @@ | |||
604 | 31 | how do I use <feature> | 31 | how do I use <feature> |
605 | 32 | help <(category|feature)> | 32 | help <(category|feature)> |
606 | 33 | """ | 33 | """ |
608 | 34 | feature = ('help',) | 34 | features = ('help',) |
609 | 35 | stemmer = Stemmer('english') | 35 | stemmer = Stemmer('english') |
610 | 36 | 36 | ||
611 | 37 | def _get_features(self): | 37 | def _get_features(self): |
612 | @@ -50,7 +50,7 @@ | |||
613 | 50 | features = {} | 50 | features = {} |
614 | 51 | processor_modules = set() | 51 | processor_modules = set() |
615 | 52 | for processor in ibid.processors: | 52 | for processor in ibid.processors: |
617 | 53 | for feature in getattr(processor, 'feature', []): | 53 | for feature in getattr(processor, 'features', []): |
618 | 54 | if feature not in features: | 54 | if feature not in features: |
619 | 55 | features[feature] = { | 55 | features[feature] = { |
620 | 56 | 'name': feature, | 56 | 'name': feature, |
621 | 57 | 57 | ||
622 | === modified file 'ibid/plugins/icecast.py' | |||
623 | --- ibid/plugins/icecast.py 2010-02-20 21:58:38 +0000 | |||
624 | +++ ibid/plugins/icecast.py 2010-03-27 17:38:22 +0000 | |||
625 | @@ -17,7 +17,7 @@ | |||
626 | 17 | }} | 17 | }} |
627 | 18 | class ICECast(Processor): | 18 | class ICECast(Processor): |
628 | 19 | usage = u"what's playing [on <stream>]?" | 19 | usage = u"what's playing [on <stream>]?" |
630 | 20 | feature = ('icecast',) | 20 | features = ('icecast',) |
631 | 21 | 21 | ||
632 | 22 | interval = IntOption('interval', | 22 | interval = IntOption('interval', |
633 | 23 | 'Interval between checking for song changes', 60) | 23 | 'Interval between checking for song changes', 60) |
634 | 24 | 24 | ||
635 | === modified file 'ibid/plugins/identity.py' | |||
636 | --- ibid/plugins/identity.py 2010-02-20 21:58:38 +0000 | |||
637 | +++ ibid/plugins/identity.py 2010-03-27 17:38:22 +0000 | |||
638 | @@ -29,7 +29,7 @@ | |||
639 | 29 | usage = u"""create account [<name>] | 29 | usage = u"""create account [<name>] |
640 | 30 | delete (my account|account <name>) | 30 | delete (my account|account <name>) |
641 | 31 | rename (my account|account <name>) to <name>""" | 31 | rename (my account|account <name>) to <name>""" |
643 | 32 | feature = ('accounts',) | 32 | features = ('accounts',) |
644 | 33 | 33 | ||
645 | 34 | @match(r'^create\s+account(?:\s+(.+))?$') | 34 | @match(r'^create\s+account(?:\s+(.+))?$') |
646 | 35 | def new_account(self, event, username): | 35 | def new_account(self, event, username): |
647 | @@ -146,7 +146,7 @@ | |||
648 | 146 | class Identities(Processor): | 146 | class Identities(Processor): |
649 | 147 | usage = u"""(I am|<username> is) <identity> on <source> | 147 | usage = u"""(I am|<username> is) <identity> on <source> |
650 | 148 | remove identity <identity> on <source> [from <username>]""" | 148 | remove identity <identity> on <source> [from <username>]""" |
652 | 149 | feature = ('accounts',) | 149 | features = ('accounts',) |
653 | 150 | priority = -10 | 150 | priority = -10 |
654 | 151 | 151 | ||
655 | 152 | def __init__(self, name): | 152 | def __init__(self, name): |
656 | @@ -319,7 +319,7 @@ | |||
657 | 319 | 319 | ||
658 | 320 | class Attributes(Processor): | 320 | class Attributes(Processor): |
659 | 321 | usage = u'set (my|<account>) <name> to <value>' | 321 | usage = u'set (my|<account>) <name> to <value>' |
661 | 322 | feature = ('accounts',) | 322 | features = ('accounts',) |
662 | 323 | 323 | ||
663 | 324 | @match(r"^set\s+(my|.+?)(?:\'s)?\s+(.+)\s+to\s+(.+)$") | 324 | @match(r"^set\s+(my|.+?)(?:\'s)?\s+(.+)\s+to\s+(.+)$") |
664 | 325 | def attribute(self, event, username, name, value): | 325 | def attribute(self, event, username, name, value): |
665 | @@ -353,7 +353,7 @@ | |||
666 | 353 | 353 | ||
667 | 354 | class Describe(Processor): | 354 | class Describe(Processor): |
668 | 355 | usage = u'who (am I|is <username>)' | 355 | usage = u'who (am I|is <username>)' |
670 | 356 | feature = ('accounts',) | 356 | features = ('accounts',) |
671 | 357 | 357 | ||
672 | 358 | @match(r'^who\s+(?:is|am)\s+(I|.+?)$') | 358 | @match(r'^who\s+(?:is|am)\s+(I|.+?)$') |
673 | 359 | def describe(self, event, username): | 359 | def describe(self, event, username): |
674 | @@ -384,7 +384,7 @@ | |||
675 | 384 | } | 384 | } |
676 | 385 | class Summon(Processor): | 385 | class Summon(Processor): |
677 | 386 | usage = u'summon <person> [via <source>]' | 386 | usage = u'summon <person> [via <source>]' |
679 | 387 | feature = ('summon',) | 387 | features = ('summon',) |
680 | 388 | permission = u'summon' | 388 | permission = u'summon' |
681 | 389 | 389 | ||
682 | 390 | default_source = Option('default_source', | 390 | default_source = Option('default_source', |
683 | @@ -509,7 +509,7 @@ | |||
684 | 509 | } | 509 | } |
685 | 510 | class AddAuth(Processor): | 510 | class AddAuth(Processor): |
686 | 511 | usage = u'authenticate <account> [on source] using <method> [<credential>]' | 511 | usage = u'authenticate <account> [on source] using <method> [<credential>]' |
688 | 512 | feature = ('auth',) | 512 | features = ('auth',) |
689 | 513 | 513 | ||
690 | 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+(.+)$') |
691 | 515 | def handler(self, event, user, source, method, credential): | 515 | def handler(self, event, user, source, method, credential): |
692 | @@ -557,7 +557,7 @@ | |||
693 | 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] |
694 | 558 | permissions [for <username>] | 558 | permissions [for <username>] |
695 | 559 | list permissions""" | 559 | list permissions""" |
697 | 560 | feature = ('auth',) | 560 | features = ('auth',) |
698 | 561 | 561 | ||
699 | 562 | permission = u'admin' | 562 | permission = u'admin' |
700 | 563 | 563 | ||
701 | @@ -643,7 +643,7 @@ | |||
702 | 643 | 643 | ||
703 | 644 | class Auth(Processor): | 644 | class Auth(Processor): |
704 | 645 | usage = u'auth <credential>' | 645 | usage = u'auth <credential>' |
706 | 646 | feature = ('auth',) | 646 | features = ('auth',) |
707 | 647 | 647 | ||
708 | 648 | @match(r'^auth(?:\s+(.+))?$') | 648 | @match(r'^auth(?:\s+(.+))?$') |
709 | 649 | def handler(self, event, password): | 649 | def handler(self, event, password): |
710 | 650 | 650 | ||
711 | === modified file 'ibid/plugins/karma.py' | |||
712 | --- ibid/plugins/karma.py 2010-02-20 21:58:38 +0000 | |||
713 | +++ ibid/plugins/karma.py 2010-03-27 17:38:22 +0000 | |||
714 | @@ -51,7 +51,7 @@ | |||
715 | 51 | 51 | ||
716 | 52 | class Set(Processor): | 52 | class Set(Processor): |
717 | 53 | usage = u'<subject> (++|--|==|ftw|ftl) [[reason]]' | 53 | usage = u'<subject> (++|--|==|ftw|ftl) [[reason]]' |
719 | 54 | feature = ('karma',) | 54 | features = ('karma',) |
720 | 55 | 55 | ||
721 | 56 | # Clashes with morse & math | 56 | # Clashes with morse & math |
722 | 57 | priority = 510 | 57 | priority = 510 |
723 | @@ -126,7 +126,7 @@ | |||
724 | 126 | class Get(Processor): | 126 | class Get(Processor): |
725 | 127 | usage = u"""karma for <subject> | 127 | usage = u"""karma for <subject> |
726 | 128 | [reverse] karmaladder""" | 128 | [reverse] karmaladder""" |
728 | 129 | feature = ('karma',) | 129 | features = ('karma',) |
729 | 130 | 130 | ||
730 | 131 | @match(r'^karma\s+(?:for\s+)?(.+)$') | 131 | @match(r'^karma\s+(?:for\s+)?(.+)$') |
731 | 132 | def handle_karma(self, event, subject): | 132 | def handle_karma(self, event, subject): |
732 | @@ -153,7 +153,7 @@ | |||
733 | 153 | 153 | ||
734 | 154 | class Forget(Processor): | 154 | class Forget(Processor): |
735 | 155 | usage = u'forget karma for <subject> [[reason]]' | 155 | usage = u'forget karma for <subject> [[reason]]' |
737 | 156 | feature = ('karma',) | 156 | features = ('karma',) |
738 | 157 | 157 | ||
739 | 158 | # Clashes with factoid | 158 | # Clashes with factoid |
740 | 159 | priority = -10 | 159 | priority = -10 |
741 | 160 | 160 | ||
742 | === modified file 'ibid/plugins/languages.py' | |||
743 | --- ibid/plugins/languages.py 2010-03-02 19:41:09 +0000 | |||
744 | +++ ibid/plugins/languages.py 2010-03-27 17:38:22 +0000 | |||
745 | @@ -24,7 +24,7 @@ | |||
746 | 24 | define <word> [using <dictionary>] | 24 | define <word> [using <dictionary>] |
747 | 25 | (dictionaries|strategies) | 25 | (dictionaries|strategies) |
748 | 26 | (dictionary|strategy) <name>""" | 26 | (dictionary|strategy) <name>""" |
750 | 27 | feature = ('dict',) | 27 | features = ('dict',) |
751 | 28 | 28 | ||
752 | 29 | server = Option('server', 'Dictionary server hostname', 'localhost') | 29 | server = Option('server', 'Dictionary server hostname', 'localhost') |
753 | 30 | port = IntOption('port', 'Dictionary server port number', 2628) | 30 | port = IntOption('port', 'Dictionary server port number', 2628) |
754 | @@ -141,7 +141,7 @@ | |||
755 | 141 | usage = u"""translate (<phrase>|<url>) [from <language>] [to <language>] | 141 | usage = u"""translate (<phrase>|<url>) [from <language>] [to <language>] |
756 | 142 | translation chain <phrase> [from <language>] [to <language>]""" | 142 | translation chain <phrase> [from <language>] [to <language>]""" |
757 | 143 | 143 | ||
759 | 144 | feature = ('translate',) | 144 | features = ('translate',) |
760 | 145 | 145 | ||
761 | 146 | api_key = Option('api_key', 'Your Google API Key (optional)', None) | 146 | api_key = Option('api_key', 'Your Google API Key (optional)', None) |
762 | 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) |
763 | 148 | 148 | ||
764 | === modified file 'ibid/plugins/lotto.py' | |||
765 | --- ibid/plugins/lotto.py 2010-02-21 09:45:01 +0000 | |||
766 | +++ ibid/plugins/lotto.py 2010-03-27 17:38:22 +0000 | |||
767 | @@ -17,7 +17,7 @@ | |||
768 | 17 | class Lotto(Processor): | 17 | class Lotto(Processor): |
769 | 18 | usage = u'lotto' | 18 | usage = u'lotto' |
770 | 19 | 19 | ||
772 | 20 | feature = ('lotto',) | 20 | features = ('lotto',) |
773 | 21 | 21 | ||
774 | 22 | za_url = 'http://www.nationallottery.co.za/' | 22 | za_url = 'http://www.nationallottery.co.za/' |
775 | 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') |
776 | 24 | 24 | ||
777 | === modified file 'ibid/plugins/meetings.py' | |||
778 | --- ibid/plugins/meetings.py 2010-02-20 21:58:38 +0000 | |||
779 | +++ ibid/plugins/meetings.py 2010-03-27 17:38:22 +0000 | |||
780 | @@ -37,7 +37,7 @@ | |||
781 | 37 | minutes so far | 37 | minutes so far |
782 | 38 | meeting title is <title> | 38 | meeting title is <title> |
783 | 39 | """ | 39 | """ |
785 | 40 | feature = ('meeting',) | 40 | features = ('meeting',) |
786 | 41 | permission = u'chairmeeting' | 41 | permission = u'chairmeeting' |
787 | 42 | 42 | ||
788 | 43 | formats = Option('formats', u'Formats to log to. ' | 43 | formats = Option('formats', u'Formats to log to. ' |
789 | @@ -244,7 +244,7 @@ | |||
790 | 244 | addressed = False | 244 | addressed = False |
791 | 245 | processed = True | 245 | processed = True |
792 | 246 | priority = 1900 | 246 | priority = 1900 |
794 | 247 | feature = ('meeting',) | 247 | features = ('meeting',) |
795 | 248 | 248 | ||
796 | 249 | def process(self, event): | 249 | def process(self, event): |
797 | 250 | if 'channel' in event and 'source' in event \ | 250 | if 'channel' in event and 'source' in event \ |
798 | @@ -283,7 +283,7 @@ | |||
799 | 283 | vote (<id> | <option>) [on <topic>] | 283 | vote (<id> | <option>) [on <topic>] |
800 | 284 | end poll | 284 | end poll |
801 | 285 | """ | 285 | """ |
803 | 286 | feature = ('poll',) | 286 | features = ('poll',) |
804 | 287 | permission = u'chairmeeting' | 287 | permission = u'chairmeeting' |
805 | 288 | 288 | ||
806 | 289 | polls = {} | 289 | polls = {} |
807 | 290 | 290 | ||
808 | === modified file 'ibid/plugins/memo.py' | |||
809 | --- ibid/plugins/memo.py 2010-02-20 21:58:38 +0000 | |||
810 | +++ ibid/plugins/memo.py 2010-03-27 17:38:22 +0000 | |||
811 | @@ -65,7 +65,7 @@ | |||
812 | 65 | class Tell(Processor): | 65 | class Tell(Processor): |
813 | 66 | usage = u"""(tell|pm|privmsg|msg|ask) <person> [on <source>] <message> | 66 | usage = u"""(tell|pm|privmsg|msg|ask) <person> [on <source>] <message> |
814 | 67 | forget my (first|last|<n>th) message for <person> [on <source>]""" | 67 | forget my (first|last|<n>th) message for <person> [on <source>]""" |
816 | 68 | feature = ('memo',) | 68 | features = ('memo',) |
817 | 69 | 69 | ||
818 | 70 | permission = u'sendmemo' | 70 | permission = u'sendmemo' |
819 | 71 | permissions = (u'recvmemo',) | 71 | permissions = (u'recvmemo',) |
820 | @@ -228,7 +228,7 @@ | |||
821 | 228 | .order_by(Memo.time.asc()).all() | 228 | .order_by(Memo.time.asc()).all() |
822 | 229 | 229 | ||
823 | 230 | class Deliver(Processor): | 230 | class Deliver(Processor): |
825 | 231 | feature = ('memo',) | 231 | features = ('memo',) |
826 | 232 | 232 | ||
827 | 233 | addressed = False | 233 | addressed = False |
828 | 234 | processed = True | 234 | processed = True |
829 | @@ -289,7 +289,7 @@ | |||
830 | 289 | nomemos_cache.add(event.identity) | 289 | nomemos_cache.add(event.identity) |
831 | 290 | 290 | ||
832 | 291 | class Notify(Processor): | 291 | class Notify(Processor): |
834 | 292 | feature = ('memo',) | 292 | features = ('memo',) |
835 | 293 | 293 | ||
836 | 294 | event_types = (u'state',) | 294 | event_types = (u'state',) |
837 | 295 | addressed = False | 295 | addressed = False |
838 | @@ -325,7 +325,7 @@ | |||
839 | 325 | usage = u"""my messages | 325 | usage = u"""my messages |
840 | 326 | message <number> | 326 | message <number> |
841 | 327 | my messages for <person> [on <source>]""" | 327 | my messages for <person> [on <source>]""" |
843 | 328 | feature = ('memo',) | 328 | features = ('memo',) |
844 | 329 | 329 | ||
845 | 330 | @match(r'^my\s+messages$') | 330 | @match(r'^my\s+messages$') |
846 | 331 | def messages(self, event): | 331 | def messages(self, event): |
847 | 332 | 332 | ||
848 | === modified file 'ibid/plugins/memory.py' | |||
849 | --- ibid/plugins/memory.py 2010-02-21 09:45:01 +0000 | |||
850 | +++ ibid/plugins/memory.py 2010-03-27 17:38:22 +0000 | |||
851 | @@ -26,7 +26,7 @@ | |||
852 | 26 | 26 | ||
853 | 27 | class MemoryLog(Processor): | 27 | class MemoryLog(Processor): |
854 | 28 | 28 | ||
856 | 29 | feature = ('memory',) | 29 | features = ('memory',) |
857 | 30 | autoload = False | 30 | autoload = False |
858 | 31 | 31 | ||
859 | 32 | mem_filename = Option('mem_filename', 'Memory log filename', 'logs/memory.log') | 32 | mem_filename = Option('mem_filename', 'Memory log filename', 'logs/memory.log') |
860 | @@ -99,7 +99,7 @@ | |||
861 | 99 | class MemoryInfo(Processor): | 99 | class MemoryInfo(Processor): |
862 | 100 | usage = u'memory usage' | 100 | usage = u'memory usage' |
863 | 101 | 101 | ||
865 | 102 | feature = ('memory',) | 102 | features = ('memory',) |
866 | 103 | 103 | ||
867 | 104 | @match('^memory\s+usage$') | 104 | @match('^memory\s+usage$') |
868 | 105 | def memory_usage(self, event): | 105 | def memory_usage(self, event): |
869 | 106 | 106 | ||
870 | === modified file 'ibid/plugins/network.py' | |||
871 | --- ibid/plugins/network.py 2010-03-07 10:08:03 +0000 | |||
872 | +++ ibid/plugins/network.py 2010-03-27 17:38:22 +0000 | |||
873 | @@ -33,7 +33,7 @@ | |||
874 | 33 | class DNS(Processor): | 33 | class DNS(Processor): |
875 | 34 | usage = u'dns [<record type>] [for] <host> [from <nameserver>]' | 34 | usage = u'dns [<record type>] [for] <host> [from <nameserver>]' |
876 | 35 | 35 | ||
878 | 36 | feature = ('dns',) | 36 | features = ('dns',) |
879 | 37 | 37 | ||
880 | 38 | def setup(self): | 38 | def setup(self): |
881 | 39 | if Resolver is None: | 39 | if Resolver is None: |
882 | @@ -82,7 +82,7 @@ | |||
883 | 82 | } | 82 | } |
884 | 83 | class Ping(Processor): | 83 | class Ping(Processor): |
885 | 84 | usage = u'ping <host>' | 84 | usage = u'ping <host>' |
887 | 85 | feature = ('ping',) | 85 | features = ('ping',) |
888 | 86 | 86 | ||
889 | 87 | ping = Option('ping', 'Path to ping executable', 'ping') | 87 | ping = Option('ping', 'Path to ping executable', 'ping') |
890 | 88 | 88 | ||
891 | @@ -115,7 +115,7 @@ | |||
892 | 115 | } | 115 | } |
893 | 116 | class Tracepath(Processor): | 116 | class Tracepath(Processor): |
894 | 117 | usage = u'tracepath <host>' | 117 | usage = u'tracepath <host>' |
896 | 118 | feature = ('tracepath',) | 118 | features = ('tracepath',) |
897 | 119 | 119 | ||
898 | 120 | tracepath = Option('tracepath', 'Path to tracepath executable', 'tracepath') | 120 | tracepath = Option('tracepath', 'Path to tracepath executable', 'tracepath') |
899 | 121 | 121 | ||
900 | @@ -144,7 +144,7 @@ | |||
901 | 144 | class IPCalc(Processor): | 144 | class IPCalc(Processor): |
902 | 145 | usage = u"""ipcalc <network>/<subnet> | 145 | usage = u"""ipcalc <network>/<subnet> |
903 | 146 | ipcalc <address> - <address>""" | 146 | ipcalc <address> - <address>""" |
905 | 147 | feature = ('ipcalc',) | 147 | features = ('ipcalc',) |
906 | 148 | 148 | ||
907 | 149 | ipcalc = Option('ipcalc', 'Path to ipcalc executable', 'ipcalc') | 149 | ipcalc = Option('ipcalc', 'Path to ipcalc executable', 'ipcalc') |
908 | 150 | 150 | ||
909 | @@ -221,7 +221,7 @@ | |||
910 | 221 | usage = u"""(get|head) <url> | 221 | usage = u"""(get|head) <url> |
911 | 222 | is <domain> (up|down) | 222 | is <domain> (up|down) |
912 | 223 | tell me when <domain|url> is up""" | 223 | tell me when <domain|url> is up""" |
914 | 224 | feature = ('http',) | 224 | features = ('http',) |
915 | 225 | priority = -10 | 225 | priority = -10 |
916 | 226 | 226 | ||
917 | 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) |
918 | @@ -417,7 +417,7 @@ | |||
919 | 417 | class TLD(Processor): | 417 | class TLD(Processor): |
920 | 418 | usage = u""".<tld> | 418 | usage = u""".<tld> |
921 | 419 | tld for <country>""" | 419 | tld for <country>""" |
923 | 420 | feature = ('tld',) | 420 | features = ('tld',) |
924 | 421 | 421 | ||
925 | 422 | country_codes = {} | 422 | country_codes = {} |
926 | 423 | 423 | ||
927 | @@ -461,7 +461,7 @@ | |||
928 | 461 | class Ports(Processor): | 461 | class Ports(Processor): |
929 | 462 | usage = u"""port for <protocol> | 462 | usage = u"""port for <protocol> |
930 | 463 | (tcp|udp) port <number>""" | 463 | (tcp|udp) port <number>""" |
932 | 464 | feature = ('ports',) | 464 | features = ('ports',) |
933 | 465 | priority = 10 | 465 | priority = 10 |
934 | 466 | 466 | ||
935 | 467 | services = Option('services', 'Path to services file', '/etc/services') | 467 | services = Option('services', 'Path to services file', '/etc/services') |
936 | @@ -534,7 +534,7 @@ | |||
937 | 534 | usage = u"""port scan <hostname> | 534 | usage = u"""port scan <hostname> |
938 | 535 | net scan <network>/<prefix>""" | 535 | net scan <network>/<prefix>""" |
939 | 536 | 536 | ||
941 | 537 | feature = ('nmap',) | 537 | features = ('nmap',) |
942 | 538 | permission = 'nmap' | 538 | permission = 'nmap' |
943 | 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) |
944 | 540 | 540 | ||
945 | 541 | 541 | ||
946 | === modified file 'ibid/plugins/oeis.py' | |||
947 | --- ibid/plugins/oeis.py 2010-02-20 21:58:38 +0000 | |||
948 | +++ ibid/plugins/oeis.py 2010-03-27 17:38:22 +0000 | |||
949 | @@ -19,7 +19,7 @@ | |||
950 | 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>) |
951 | 20 | oeis <term>[, ...]""" | 20 | oeis <term>[, ...]""" |
952 | 21 | 21 | ||
954 | 22 | feature = ('oeis',) | 22 | features = ('oeis',) |
955 | 23 | 23 | ||
956 | 24 | @match(r'^oeis\s+([AMN]\d+|-?\d(?:\d|-|,|\s)*)$') | 24 | @match(r'^oeis\s+([AMN]\d+|-?\d(?:\d|-|,|\s)*)$') |
957 | 25 | def oeis (self, event, query): | 25 | def oeis (self, event, query): |
958 | 26 | 26 | ||
959 | === modified file 'ibid/plugins/quotes.py' | |||
960 | --- ibid/plugins/quotes.py 2010-03-27 14:18:33 +0000 | |||
961 | +++ ibid/plugins/quotes.py 2010-03-27 17:38:22 +0000 | |||
962 | @@ -27,7 +27,7 @@ | |||
963 | 27 | } | 27 | } |
964 | 28 | class Fortune(Processor, RPC): | 28 | class Fortune(Processor, RPC): |
965 | 29 | usage = u'fortune' | 29 | usage = u'fortune' |
967 | 30 | feature = ('fortune',) | 30 | features = ('fortune',) |
968 | 31 | 31 | ||
969 | 32 | fortune = Option('fortune', 'Path of the fortune executable', 'fortune') | 32 | fortune = Option('fortune', 'Path of the fortune executable', 'fortune') |
970 | 33 | 33 | ||
971 | @@ -66,7 +66,7 @@ | |||
972 | 66 | class Bash(Processor): | 66 | class Bash(Processor): |
973 | 67 | usage = u'bash[.org] [(random|<number>)]' | 67 | usage = u'bash[.org] [(random|<number>)]' |
974 | 68 | 68 | ||
976 | 69 | feature = ('bash',) | 69 | features = ('bash',) |
977 | 70 | 70 | ||
978 | 71 | public_browse = BoolOption('public_browse', 'Allow random quotes in public', True) | 71 | public_browse = BoolOption('public_browse', 'Allow random quotes in public', True) |
979 | 72 | 72 | ||
980 | @@ -103,7 +103,7 @@ | |||
981 | 103 | class FMyLife(Processor): | 103 | class FMyLife(Processor): |
982 | 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 )' |
983 | 105 | 105 | ||
985 | 106 | feature = ('fml',) | 106 | features = ('fml',) |
986 | 107 | 107 | ||
987 | 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/') |
988 | 109 | # The Ibid API Key, registered by Stefano Rivera: | 109 | # The Ibid API Key, registered by Stefano Rivera: |
989 | @@ -173,7 +173,7 @@ | |||
990 | 173 | usage = u"""tfln [(random|<number>)] | 173 | usage = u"""tfln [(random|<number>)] |
991 | 174 | tfln (worst|best) [(today|this week|this month)]""" | 174 | tfln (worst|best) [(today|this week|this month)]""" |
992 | 175 | 175 | ||
994 | 176 | feature = ('tfln',) | 176 | features = ('tfln',) |
995 | 177 | 177 | ||
996 | 178 | public_browse = BoolOption('public_browse', 'Allow random quotes in public', True) | 178 | public_browse = BoolOption('public_browse', 'Allow random quotes in public', True) |
997 | 179 | 179 | ||
998 | @@ -252,7 +252,7 @@ | |||
999 | 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 )] |
1000 | 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 )]""" |
1001 | 254 | 254 | ||
1003 | 255 | feature = ('mlia',) | 255 | features = ('mlia',) |
1004 | 256 | 256 | ||
1005 | 257 | public_browse = BoolOption('public_browse', | 257 | public_browse = BoolOption('public_browse', |
1006 | 258 | 'Allow random quotes in public', True) | 258 | 'Allow random quotes in public', True) |
1007 | @@ -367,7 +367,7 @@ | |||
1008 | 367 | usage = u"""bible <passages> [in <version>] | 367 | usage = u"""bible <passages> [in <version>] |
1009 | 368 | <book> <verses> [in <version>]""" | 368 | <book> <verses> [in <version>]""" |
1010 | 369 | 369 | ||
1012 | 370 | feature = ('bible',) | 370 | features = ('bible',) |
1013 | 371 | # http://labs.bible.org/api/ is an alternative | 371 | # http://labs.bible.org/api/ is an alternative |
1014 | 372 | # Their feature set is a little different, but they should be fairly | 372 | # Their feature set is a little different, but they should be fairly |
1015 | 373 | # compatible | 373 | # compatible |
1016 | 374 | 374 | ||
1017 | === modified file 'ibid/plugins/rfc.py' | |||
1018 | --- ibid/plugins/rfc.py 2010-02-20 21:58:38 +0000 | |||
1019 | +++ ibid/plugins/rfc.py 2010-03-27 17:38:22 +0000 | |||
1020 | @@ -21,7 +21,7 @@ | |||
1021 | 21 | usage = u"""rfc <number> | 21 | usage = u"""rfc <number> |
1022 | 22 | rfc [for] <search terms> | 22 | rfc [for] <search terms> |
1023 | 23 | rfc [for] /regex/""" | 23 | rfc [for] /regex/""" |
1025 | 24 | feature = ('rfc',) | 24 | features = ('rfc',) |
1026 | 25 | 25 | ||
1027 | 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") |
1028 | 27 | cachetime = IntOption("cachetime", "Time to cache RFC index for", cachetime) | 27 | cachetime = IntOption("cachetime", "Time to cache RFC index for", cachetime) |
1029 | 28 | 28 | ||
1030 | === modified file 'ibid/plugins/seen.py' | |||
1031 | --- ibid/plugins/seen.py 2010-02-20 21:58:38 +0000 | |||
1032 | +++ ibid/plugins/seen.py 2010-03-27 17:38:22 +0000 | |||
1033 | @@ -63,7 +63,7 @@ | |||
1034 | 63 | self.type, self.identity_id, self.channel, self.time, self.value) | 63 | self.type, self.identity_id, self.channel, self.time, self.value) |
1035 | 64 | 64 | ||
1036 | 65 | class See(Processor): | 65 | class See(Processor): |
1038 | 66 | feature = ('seen',) | 66 | features = ('seen',) |
1039 | 67 | 67 | ||
1040 | 68 | priority = 1500 | 68 | priority = 1500 |
1041 | 69 | event_types = (u'message', u'state') | 69 | event_types = (u'message', u'state') |
1042 | @@ -98,7 +98,7 @@ | |||
1043 | 98 | 98 | ||
1044 | 99 | class Seen(Processor): | 99 | class Seen(Processor): |
1045 | 100 | usage = u'seen <who>' | 100 | usage = u'seen <who>' |
1047 | 101 | feature = ('seen',) | 101 | features = ('seen',) |
1048 | 102 | 102 | ||
1049 | 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+))?$') |
1050 | 104 | def handler(self, event, who, source): | 104 | def handler(self, event, who, source): |
1051 | 105 | 105 | ||
1052 | === modified file 'ibid/plugins/social.py' | |||
1053 | --- ibid/plugins/social.py 2010-03-01 15:13:45 +0000 | |||
1054 | +++ ibid/plugins/social.py 2010-03-27 17:38:22 +0000 | |||
1055 | @@ -24,7 +24,7 @@ | |||
1056 | 24 | class LastFm(Processor): | 24 | class LastFm(Processor): |
1057 | 25 | usage = u'last.fm for <username>' | 25 | usage = u'last.fm for <username>' |
1058 | 26 | 26 | ||
1060 | 27 | feature = ('lastfm',) | 27 | features = ('lastfm',) |
1061 | 28 | 28 | ||
1062 | 29 | @match(r'^last\.?fm\s+for\s+(\S+?)\s*$') | 29 | @match(r'^last\.?fm\s+for\s+(\S+?)\s*$') |
1063 | 30 | def listsongs(self, event, username): | 30 | def listsongs(self, event, username): |
1064 | @@ -46,7 +46,7 @@ | |||
1065 | 46 | usage = u"""latest (tweet|identica) from <name> | 46 | usage = u"""latest (tweet|identica) from <name> |
1066 | 47 | (tweet|identica) <number>""" | 47 | (tweet|identica) <number>""" |
1067 | 48 | 48 | ||
1069 | 49 | feature = ('microblog',) | 49 | features = ('microblog',) |
1070 | 50 | 50 | ||
1071 | 51 | default = { | 51 | default = { |
1072 | 52 | 'twitter': {'endpoint': 'http://twitter.com/', 'api': 'twitter', 'name': 'tweet', 'user': 'twit'}, | 52 | 'twitter': {'endpoint': 'http://twitter.com/', 'api': 'twitter', 'name': 'tweet', 'user': 'twit'}, |
1073 | 53 | 53 | ||
1074 | === modified file 'ibid/plugins/sources.py' | |||
1075 | --- ibid/plugins/sources.py 2010-03-14 10:27:08 +0000 | |||
1076 | +++ ibid/plugins/sources.py 2010-03-27 17:38:22 +0000 | |||
1077 | @@ -22,7 +22,7 @@ | |||
1078 | 22 | class Actions(Processor): | 22 | class Actions(Processor): |
1079 | 23 | usage = u"""(join|part|leave) [<channel> [on <source>]] | 23 | usage = u"""(join|part|leave) [<channel> [on <source>]] |
1080 | 24 | change nick to <nick> [on <source>]""" | 24 | change nick to <nick> [on <source>]""" |
1082 | 25 | feature = ('actions',) | 25 | features = ('actions',) |
1083 | 26 | 26 | ||
1084 | 27 | permission = 'sources' | 27 | permission = 'sources' |
1085 | 28 | 28 | ||
1086 | @@ -75,7 +75,7 @@ | |||
1087 | 75 | event.addresponse(u'Changing nick to %s', nick) | 75 | event.addresponse(u'Changing nick to %s', nick) |
1088 | 76 | 76 | ||
1089 | 77 | class Invited(Processor): | 77 | class Invited(Processor): |
1091 | 78 | feature = ('actions',) | 78 | features = ('actions',) |
1092 | 79 | 79 | ||
1093 | 80 | event_types = ('invite',) | 80 | event_types = ('invite',) |
1094 | 81 | permission = 'sources' | 81 | permission = 'sources' |
1095 | @@ -120,7 +120,7 @@ | |||
1096 | 120 | } | 120 | } |
1097 | 121 | class SayDo(Processor): | 121 | class SayDo(Processor): |
1098 | 122 | usage = u'(say|do) in <channel> [on <source>] <text>' | 122 | usage = u'(say|do) in <channel> [on <source>] <text>' |
1100 | 123 | feature = ('saydo',) | 123 | features = ('saydo',) |
1101 | 124 | 124 | ||
1102 | 125 | permission = u'saydo' | 125 | permission = u'saydo' |
1103 | 126 | 126 | ||
1104 | @@ -137,7 +137,7 @@ | |||
1105 | 137 | } | 137 | } |
1106 | 138 | class RedirectCommand(Processor): | 138 | class RedirectCommand(Processor): |
1107 | 139 | usage = u'redirect [to] <channel> [on <source>] <command>' | 139 | usage = u'redirect [to] <channel> [on <source>] <command>' |
1109 | 140 | feature = ('redirect',) | 140 | features = ('redirect',) |
1110 | 141 | 141 | ||
1111 | 142 | priority = -1200 | 142 | priority = -1200 |
1112 | 143 | permission = u'saydo' | 143 | permission = u'saydo' |
1113 | @@ -154,7 +154,7 @@ | |||
1114 | 154 | event.message['clean'] = command | 154 | event.message['clean'] = command |
1115 | 155 | 155 | ||
1116 | 156 | class Redirect(Processor): | 156 | class Redirect(Processor): |
1118 | 157 | feature = ('redirect',) | 157 | features = ('redirect',) |
1119 | 158 | 158 | ||
1120 | 159 | processed = True | 159 | processed = True |
1121 | 160 | priority = 940 | 160 | priority = 940 |
1122 | 161 | 161 | ||
1123 | === modified file 'ibid/plugins/strings.py' | |||
1124 | --- ibid/plugins/strings.py 2010-03-01 15:13:45 +0000 | |||
1125 | +++ ibid/plugins/strings.py 2010-03-27 17:38:22 +0000 | |||
1126 | @@ -18,7 +18,7 @@ | |||
1127 | 18 | class Hash(Processor): | 18 | class Hash(Processor): |
1128 | 19 | usage = u"""(md5|sha1|sha224|sha256|sha384|sha512) <string> | 19 | usage = u"""(md5|sha1|sha224|sha256|sha384|sha512) <string> |
1129 | 20 | crypt <string> <salt>""" | 20 | crypt <string> <salt>""" |
1131 | 21 | feature = ('hash',) | 21 | features = ('hash',) |
1132 | 22 | 22 | ||
1133 | 23 | @match(r'^(md5|sha1|sha224|sha256|sha384|sha512)(?:sum)?\s+(.+?)$') | 23 | @match(r'^(md5|sha1|sha224|sha256|sha384|sha512)(?:sum)?\s+(.+?)$') |
1134 | 24 | def hash(self, event, hash, string): | 24 | def hash(self, event, hash, string): |
1135 | @@ -35,7 +35,7 @@ | |||
1136 | 35 | } | 35 | } |
1137 | 36 | class Base64(Processor): | 36 | class Base64(Processor): |
1138 | 37 | usage = u'base(16|32|64) (encode|decode) <string>' | 37 | usage = u'base(16|32|64) (encode|decode) <string>' |
1140 | 38 | feature = ('base64',) | 38 | features = ('base64',) |
1141 | 39 | 39 | ||
1142 | 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+(.+?)$') |
1143 | 41 | def base64(self, event, base, operation, string): | 41 | def base64(self, event, base, operation, string): |
1144 | @@ -59,7 +59,7 @@ | |||
1145 | 59 | } | 59 | } |
1146 | 60 | class Rot13(Processor): | 60 | class Rot13(Processor): |
1147 | 61 | usage = u'rot13 <string>' | 61 | usage = u'rot13 <string>' |
1149 | 62 | feature = ('rot13',) | 62 | features = ('rot13',) |
1150 | 63 | 63 | ||
1151 | 64 | @match(r'^rot13\s+(.+)$') | 64 | @match(r'^rot13\s+(.+)$') |
1152 | 65 | def rot13(self, event, string): | 65 | def rot13(self, event, string): |
1153 | @@ -72,7 +72,7 @@ | |||
1154 | 72 | } | 72 | } |
1155 | 73 | class Dvorak(Processor): | 73 | class Dvorak(Processor): |
1156 | 74 | usage = u"""(aoeu|asdf) <text>""" | 74 | usage = u"""(aoeu|asdf) <text>""" |
1158 | 75 | feature = ('dvorak',) | 75 | features = ('dvorak',) |
1159 | 76 | 76 | ||
1160 | 77 | # List of characters on each keyboard layout | 77 | # List of characters on each keyboard layout |
1161 | 78 | dvormap = u"""',.pyfgcrl/=aoeuidhtns-;qjkxbmwvz"<>PYFGCRL?+AOEUIDHTNS_:QJKXBMWVZ[]{}|""" | 78 | dvormap = u"""',.pyfgcrl/=aoeuidhtns-;qjkxbmwvz"<>PYFGCRL?+AOEUIDHTNS_:QJKXBMWVZ[]{}|""" |
1162 | @@ -98,7 +98,7 @@ | |||
1163 | 98 | } | 98 | } |
1164 | 99 | class ReTest(Processor): | 99 | class ReTest(Processor): |
1165 | 100 | usage = u'does <pattern> match <string>' | 100 | usage = u'does <pattern> match <string>' |
1167 | 101 | feature = ('retest',) | 101 | features = ('retest',) |
1168 | 102 | permission = 'regex' | 102 | permission = 'regex' |
1169 | 103 | 103 | ||
1170 | 104 | @match('^does\s+(.+?)\s+match\s+(.+?)$') | 104 | @match('^does\s+(.+?)\s+match\s+(.+?)$') |
1171 | @@ -112,7 +112,7 @@ | |||
1172 | 112 | } | 112 | } |
1173 | 113 | class Morse(Processor): | 113 | class Morse(Processor): |
1174 | 114 | usage = u'morse (text|morsecode)' | 114 | usage = u'morse (text|morsecode)' |
1176 | 115 | feature = ('morse',) | 115 | features = ('morse',) |
1177 | 116 | 116 | ||
1178 | 117 | _table = { | 117 | _table = { |
1179 | 118 | 'A': ".-", | 118 | 'A': ".-", |
1180 | 119 | 119 | ||
1181 | === modified file 'ibid/plugins/svn.py' | |||
1182 | --- ibid/plugins/svn.py 2010-02-21 09:45:01 +0000 | |||
1183 | +++ ibid/plugins/svn.py 2010-03-27 17:38:22 +0000 | |||
1184 | @@ -393,7 +393,7 @@ | |||
1185 | 393 | usage = u"""(last commit|commit <revno>) [to <repo>] [full] | 393 | usage = u"""(last commit|commit <revno>) [to <repo>] [full] |
1186 | 394 | (svnrepos|svnrepositories) | 394 | (svnrepos|svnrepositories) |
1187 | 395 | """ | 395 | """ |
1189 | 396 | feature = ('svn',) | 396 | features = ('svn',) |
1190 | 397 | autoload = False | 397 | autoload = False |
1191 | 398 | 398 | ||
1192 | 399 | permission = u'svn' | 399 | permission = u'svn' |
1193 | 400 | 400 | ||
1194 | === modified file 'ibid/plugins/sysadmin.py' | |||
1195 | --- ibid/plugins/sysadmin.py 2010-03-07 18:32:23 +0000 | |||
1196 | +++ ibid/plugins/sysadmin.py 2010-03-27 17:38:22 +0000 | |||
1197 | @@ -17,7 +17,7 @@ | |||
1198 | 17 | } | 17 | } |
1199 | 18 | class Aptitude(Processor): | 18 | class Aptitude(Processor): |
1200 | 19 | usage = u'apt (search|show) <term>' | 19 | usage = u'apt (search|show) <term>' |
1202 | 20 | feature = ('aptitude',) | 20 | features = ('aptitude',) |
1203 | 21 | 21 | ||
1204 | 22 | aptitude = Option('aptitude', 'Path to aptitude executable', 'aptitude') | 22 | aptitude = Option('aptitude', 'Path to aptitude executable', 'aptitude') |
1205 | 23 | 23 | ||
1206 | @@ -120,7 +120,7 @@ | |||
1207 | 120 | } | 120 | } |
1208 | 121 | class AptFile(Processor): | 121 | class AptFile(Processor): |
1209 | 122 | usage = u'apt-file [search] <term>' | 122 | usage = u'apt-file [search] <term>' |
1211 | 123 | feature = ('apt-file',) | 123 | features = ('apt-file',) |
1212 | 124 | 124 | ||
1213 | 125 | aptfile = Option('apt-file', 'Path to apt-file executable', 'apt-file') | 125 | aptfile = Option('apt-file', 'Path to apt-file executable', 'apt-file') |
1214 | 126 | 126 | ||
1215 | @@ -159,7 +159,7 @@ | |||
1216 | 159 | } | 159 | } |
1217 | 160 | class Man(Processor): | 160 | class Man(Processor): |
1218 | 161 | usage = u'man [<section>] <page>' | 161 | usage = u'man [<section>] <page>' |
1220 | 162 | feature = ('man',) | 162 | features = ('man',) |
1221 | 163 | 163 | ||
1222 | 164 | man = Option('man', 'Path of the man executable', 'man') | 164 | man = Option('man', 'Path of the man executable', 'man') |
1223 | 165 | 165 | ||
1224 | @@ -202,7 +202,7 @@ | |||
1225 | 202 | } | 202 | } |
1226 | 203 | class Mac(Processor): | 203 | class Mac(Processor): |
1227 | 204 | usage = u'mac <address>' | 204 | usage = u'mac <address>' |
1229 | 205 | feature = ('mac',) | 205 | features = ('mac',) |
1230 | 206 | 206 | ||
1231 | 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})$') |
1232 | 208 | def lookup_mac(self, event, _, mac): | 208 | def lookup_mac(self, event, _, mac): |
1233 | 209 | 209 | ||
1234 | === modified file 'ibid/plugins/test.py' | |||
1235 | --- ibid/plugins/test.py 2010-02-20 21:58:38 +0000 | |||
1236 | +++ ibid/plugins/test.py 2010-03-27 17:38:22 +0000 | |||
1237 | @@ -18,7 +18,7 @@ | |||
1238 | 18 | raise exception | 18 | raise exception |
1239 | 19 | topic <topic> | 19 | topic <topic> |
1240 | 20 | """ | 20 | """ |
1242 | 21 | feature = ('test',) | 21 | features = ('test',) |
1243 | 22 | permission = u'debug' | 22 | permission = u'debug' |
1244 | 23 | 23 | ||
1245 | 24 | @match(r'^delay\s+(\d+\.?\d*)$') | 24 | @match(r'^delay\s+(\d+\.?\d*)$') |
1246 | 25 | 25 | ||
1247 | === modified file 'ibid/plugins/trac.py' | |||
1248 | --- ibid/plugins/trac.py 2010-02-20 21:58:38 +0000 | |||
1249 | +++ ibid/plugins/trac.py 2010-03-27 17:38:22 +0000 | |||
1250 | @@ -30,7 +30,7 @@ | |||
1251 | 30 | class Tickets(Processor, RPC): | 30 | class Tickets(Processor, RPC): |
1252 | 31 | usage = u"""ticket <number> | 31 | usage = u"""ticket <number> |
1253 | 32 | (open|my|<who>'s) tickets""" | 32 | (open|my|<who>'s) tickets""" |
1255 | 33 | feature = ('trac',) | 33 | features = ('trac',) |
1256 | 34 | autoload = 'trac' in ibid.databases | 34 | autoload = 'trac' in ibid.databases |
1257 | 35 | 35 | ||
1258 | 36 | url = Option('url', 'URL of Trac instance') | 36 | url = Option('url', 'URL of Trac instance') |
1259 | 37 | 37 | ||
1260 | === modified file 'ibid/plugins/urlinfo.py' | |||
1261 | --- ibid/plugins/urlinfo.py 2010-02-20 21:58:38 +0000 | |||
1262 | +++ ibid/plugins/urlinfo.py 2010-03-27 17:38:22 +0000 | |||
1263 | @@ -26,7 +26,7 @@ | |||
1264 | 26 | } | 26 | } |
1265 | 27 | class Shorten(Processor): | 27 | class Shorten(Processor): |
1266 | 28 | usage = u'shorten <url>' | 28 | usage = u'shorten <url>' |
1268 | 29 | feature = ('tinyurl',) | 29 | features = ('tinyurl',) |
1269 | 30 | 30 | ||
1270 | 31 | @match(r'^shorten\s+(\S+\.\S+)$') | 31 | @match(r'^shorten\s+(\S+\.\S+)$') |
1271 | 32 | def shorten(self, event, url): | 32 | def shorten(self, event, url): |
1272 | @@ -44,7 +44,7 @@ | |||
1273 | 44 | class Lengthen(Processor): | 44 | class Lengthen(Processor): |
1274 | 45 | usage = u"""<url> | 45 | usage = u"""<url> |
1275 | 46 | expand <url>""" | 46 | expand <url>""" |
1277 | 47 | feature = ('tinyurl',) | 47 | features = ('tinyurl',) |
1278 | 48 | 48 | ||
1279 | 49 | services = ListOption('services', 'List of URL prefixes of URL shortening services', ( | 49 | services = ListOption('services', 'List of URL prefixes of URL shortening services', ( |
1280 | 50 | 'http://is.gd/', 'http://tinyurl.com/', 'http://ff.im/', | 50 | 'http://is.gd/', 'http://tinyurl.com/', 'http://ff.im/', |
1281 | @@ -81,7 +81,7 @@ | |||
1282 | 81 | class Youtube(Processor): | 81 | class Youtube(Processor): |
1283 | 82 | usage = u'<Youtube URL>' | 82 | usage = u'<Youtube URL>' |
1284 | 83 | 83 | ||
1286 | 84 | feature = ('youtube',) | 84 | features = ('youtube',) |
1287 | 85 | 85 | ||
1288 | 86 | @match(r'^(?:youtube(?:\.com)?\s+)?' | 86 | @match(r'^(?:youtube(?:\.com)?\s+)?' |
1289 | 87 | r'(?:http://)?(?:\w+\.)?youtube\.com/' | 87 | r'(?:http://)?(?:\w+\.)?youtube\.com/' |
Is this important enough to backport?