diff starttreepkgweb.py @ 49:38d66dc6a1e5

merge
author Bernhard Herzog <bh@intevation.de>
date Mon, 02 Apr 2007 20:48:25 +0200
parents 467013d9d627
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/starttreepkgweb.py	Mon Apr 02 20:48:25 2007 +0200
@@ -0,0 +1,33 @@
+#! /usr/bin/python2.4
+# Copyright (C) 2007 by Intevation GmbH
+# Authors:
+# Bernhard Herzog <bh@intevation.de>
+#
+# This program is free software under the GPL (>=v2)
+# Read the file COPYING coming with the software for details.
+
+"""Starts the tree packager webinterface"""
+
+import os
+from optparse import OptionParser
+
+from treepkg.web import runserver
+
+def parse_commandline():
+    parser = OptionParser()
+    dirname = os.path.dirname(__file__)
+    parser.set_defaults(config_file=os.path.join(dirname, "treepkg.cfg"),
+                        cherrypy_config=os.path.join(dirname, "cherrypy.cfg"))
+    parser.add_option("--config-file",
+                      help=("The tree packager config file."
+                            " Default treepkg.cfg"))
+    parser.add_option("--cherrypy-config",
+                      help=("The cherrypy config file for the web interface."
+                            " Default cherrypy.cfg"))
+    return parser.parse_args()
+
+def main():
+    options, args = parse_commandline()
+    runserver(options.config_file, options.cherrypy_config)
+
+main()
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)