Rev 12490 | Rev 12512 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
12490 | malex | 1 | ### |
2 | # Copyright (c) 2007, Oleksandr Moskalenko |
||
3 | # All rights reserved. |
||
4 | # |
||
5 | # This program is free software: you can redistribute it and/or modify |
||
6 | # it under the terms of the GNU General Public License as published by |
||
7 | # the Free Software Foundation, either version 3 of the License, or |
||
8 | # (at your option) any later version. |
||
9 | # |
||
10 | # This program is distributed in the hope that it will be useful, |
||
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||
13 | # GNU General Public License for more details. |
||
14 | # |
||
15 | # You should have received a copy of the GNU General Public License |
||
16 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
||
17 | ### |
||
18 | |||
19 | import supybot.conf as conf |
||
20 | import supybot.registry as registry |
||
21 | import supybot.callbacks as callbacks |
||
22 | |||
23 | def configure(advanced): |
||
24 | # This will be called by supybot to configure this module. advanced is |
||
25 | # a bool that specifies whether the user identified himself as an advanced |
||
26 | # user or not. You should effect your configuration by manipulating the |
||
27 | # registry as appropriate. |
||
28 | from supybot.questions import expect, anything, something, yn |
||
29 | conf.registerPlugin('Svnwatch', True) |
||
12492 | malex | 30 | output('The default SVN xml URI is xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx') |
12490 | malex | 31 | if yn('Would you like to specify a SVN xml URI?'): |
32 | xmluri = something('SVN XML URI?') |
||
33 | conf.supybot.plugins.Svnwatch.set(xmluri) |
||
34 | |||
35 | #class PostChannels(registry.SpaceSeparated): |
||
36 | # List = callbacks.CanonicalNameSet |
||
37 | |||
38 | Svnwatch = conf.registerPlugin('Svnwatch') |
||
39 | # This is where your configuration variables (if any) should go. For example: |
||
40 | # conf.registerGlobalValue(Svnwatch, 'someConfigVariableName', |
||
41 | # registry.Boolean(False, """Help for someConfigVariableName.""")) |
||
42 | conf.registerGlobalValue(Svnwatch, 'xmluri', |
||
12492 | malex | 43 | registry.String('', |
12490 | malex | 44 | """The uri for the exported SVN XML source.""")) |
45 | conf.registerGlobalValue(Svnwatch, 'fetchPeriod', |
||
46 | registry.PositiveInteger(60, """Indicates how many seconds the |
||
47 | bot will wait between retrieving new svn commit |
||
48 | information.""")) |
||
49 | conf.registerGlobalValue(Svnwatch, 'lastRevision', |
||
50 | registry.PositiveInteger(1000, """Indicates the last revision published in |
||
51 | the channels.""")) |
||
52 | conf.registerGlobalValue(Svnwatch, 'postFrequency', registry.PositiveInteger(5, |
||
53 | """Indicates how many seconds the bot will wait between posting svn commit |
||
54 | information messages.""")) |
||
55 | conf.registerGlobalValue(Svnwatch, |
||
56 | 'channels', conf.SpaceSeparatedSetOfChannels([], """Determines |
||
57 | which channels the bot will post SVN commit information to.""")) |
||
58 | |||
59 | # vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79: |