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