Subversion Repositories Scribus

Rev

Rev 12492 | 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
 
22
def configure(advanced):
23
    # This will be called by supybot to configure this module.  advanced is
24
    # a bool that specifies whether the user identified himself as an advanced
25
    # user or not.  You should effect your configuration by manipulating the
26
    # registry as appropriate.
27
    from supybot.questions import expect, anything, something, yn
28
    conf.registerPlugin('Svnwatch', True)
12512 malex 29
#    output('The default SVN xml URI is https://www.postnewspapers.com.au/cgi-bin/xmllog')
30
#    if yn('Would you like to specify a SVN xml URI?'):
31
#        xmluri = something('SVN XML URI?')
32
#        conf.supybot.plugins.Svnwatch.set(xmluri)
12490 malex 33
 
34
Svnwatch = conf.registerPlugin('Svnwatch')
35
# This is where your configuration variables (if any) should go.  For example:
36
# conf.registerGlobalValue(Svnwatch, 'someConfigVariableName',
37
# registry.Boolean(False, """Help for someConfigVariableName."""))
12512 malex 38
conf.registerGlobalValue(Svnwatch, 'batchSize', registry.PositiveInteger(3,
39
    """Determines the upper limit on the number of reports that will be output
40
    at a time."""))
41
#conf.registerGlobalValue(Svnwatch, 'xmluri',
42
#    registry.String("https://www.postnewspapers.com.au/cgi-bin/xmllog",
43
#        """The uri for the exported SVN XML source."""))
12490 malex 44
conf.registerGlobalValue(Svnwatch, 'fetchPeriod',
12512 malex 45
    registry.PositiveInteger(60, """Indicates how many seconds the bot will
46
    wait between retrieving new svn commit information."""))
47
conf.registerGlobalValue(Svnwatch, 'channels', conf.SpaceSeparatedSetOfChannels([],
48
    """Determines which channels the bot will post SVN commit information
49
    to."""))
12490 malex 50
conf.registerGlobalValue(Svnwatch, 'lastRevision',
51
    registry.PositiveInteger(1000, """Indicates the last revision published in
12512 malex 52
    the channels."""))
12490 malex 53
conf.registerGlobalValue(Svnwatch, 'postFrequency', registry.PositiveInteger(5,
54
    """Indicates how many seconds the bot will wait between posting svn commit
55
        information messages."""))
56
 
57
# vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79: