bh@20: #! /usr/bin/python2.4 bh@20: # Copyright (C) 2007 by Intevation GmbH bh@20: # Authors: bh@20: # Bernhard Herzog bh@20: # bh@20: # This program is free software under the GPL (>=v2) bh@20: # Read the file COPYING coming with the software for details. bh@20: bh@20: """Starts the tree packager webinterface""" bh@20: bh@20: import os bh@20: from optparse import OptionParser bh@20: bh@20: from treepkg.web import runserver bh@20: bh@20: def parse_commandline(): bh@20: parser = OptionParser() bh@20: dirname = os.path.dirname(__file__) bh@20: parser.set_defaults(config_file=os.path.join(dirname, "treepkg.cfg"), bh@20: cherrypy_config=os.path.join(dirname, "cherrypy.cfg")) bh@20: parser.add_option("--config-file", bh@20: help=("The tree packager config file." bh@20: " Default treepkg.cfg")) bh@20: parser.add_option("--cherrypy-config", bh@20: help=("The cherrypy config file for the web interface." bh@20: " Default cherrypy.cfg")) bh@20: return parser.parse_args() bh@20: bh@20: def main(): bh@20: options, args = parse_commandline() bh@20: runserver(options.config_file, options.cherrypy_config) bh@20: bh@20: main()