annotate starttreepkgweb.py @ 73:26a617c0f76b

fix typo
author Bernhard Herzog <bh@intevation.de>
date Mon, 16 Apr 2007 13:20:09 +0200
parents 467013d9d627
children
rev   line source
20
467013d9d627 Add simple web interface for status reports
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
1 #! /usr/bin/python2.4
467013d9d627 Add simple web interface for status reports
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
2 # Copyright (C) 2007 by Intevation GmbH
467013d9d627 Add simple web interface for status reports
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
3 # Authors:
467013d9d627 Add simple web interface for status reports
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
4 # Bernhard Herzog <bh@intevation.de>
467013d9d627 Add simple web interface for status reports
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
5 #
467013d9d627 Add simple web interface for status reports
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
6 # This program is free software under the GPL (>=v2)
467013d9d627 Add simple web interface for status reports
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
7 # Read the file COPYING coming with the software for details.
467013d9d627 Add simple web interface for status reports
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
8
467013d9d627 Add simple web interface for status reports
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
9 """Starts the tree packager webinterface"""
467013d9d627 Add simple web interface for status reports
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
10
467013d9d627 Add simple web interface for status reports
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
11 import os
467013d9d627 Add simple web interface for status reports
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
12 from optparse import OptionParser
467013d9d627 Add simple web interface for status reports
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
13
467013d9d627 Add simple web interface for status reports
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
14 from treepkg.web import runserver
467013d9d627 Add simple web interface for status reports
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
15
467013d9d627 Add simple web interface for status reports
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
16 def parse_commandline():
467013d9d627 Add simple web interface for status reports
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
17 parser = OptionParser()
467013d9d627 Add simple web interface for status reports
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
18 dirname = os.path.dirname(__file__)
467013d9d627 Add simple web interface for status reports
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
19 parser.set_defaults(config_file=os.path.join(dirname, "treepkg.cfg"),
467013d9d627 Add simple web interface for status reports
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
20 cherrypy_config=os.path.join(dirname, "cherrypy.cfg"))
467013d9d627 Add simple web interface for status reports
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
21 parser.add_option("--config-file",
467013d9d627 Add simple web interface for status reports
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
22 help=("The tree packager config file."
467013d9d627 Add simple web interface for status reports
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
23 " Default treepkg.cfg"))
467013d9d627 Add simple web interface for status reports
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
24 parser.add_option("--cherrypy-config",
467013d9d627 Add simple web interface for status reports
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
25 help=("The cherrypy config file for the web interface."
467013d9d627 Add simple web interface for status reports
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
26 " Default cherrypy.cfg"))
467013d9d627 Add simple web interface for status reports
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
27 return parser.parse_args()
467013d9d627 Add simple web interface for status reports
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
28
467013d9d627 Add simple web interface for status reports
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
29 def main():
467013d9d627 Add simple web interface for status reports
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
30 options, args = parse_commandline()
467013d9d627 Add simple web interface for status reports
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
31 runserver(options.config_file, options.cherrypy_config)
467013d9d627 Add simple web interface for status reports
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
32
467013d9d627 Add simple web interface for status reports
Bernhard Herzog <bh@intevation.de>
parents:
diff changeset
33 main()
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)