1
# Twisted, the Framework of Your Internet
2
# Copyright (C) 2001 Matthew W. Lefkowitz
4
# This library is free software; you can redistribute it and/or
5
# modify it under the terms of version 2.1 of the GNU Lesser General Public
6
# License as published by the Free Software Foundation.
8
# This library is distributed in the hope that it will be useful,
9
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
# Lesser General Public License for more details.
13
# You should have received a copy of the GNU Lesser General Public
14
# License along with this library; if not, write to the Free Software
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
from twisted.news import news, database
17
from twisted.protocols import nntp
18
from twisted.python import usage
20
class Options(usage.Options):
21
synopsis = "Usage: mktap nntp [options]"
24
["port", "p", "119", "Listen port"]
28
usage.Options.__init__(self)
30
def opt_port(self, port):
33
def updateApplication(app, config):
35
int(config.opts['port']),
36
news.createNNTPFactory(nntp.NNTPServer, database.PickleStorage)