bh@65: #! /usr/bin/python2.4 bh@65: # Copyright (C) 2007 by Intevation GmbH bh@65: # Authors: bh@65: # Bernhard Herzog bh@65: # bh@65: # This program is free software under the GPL (>=v2) bh@65: # Read the file COPYING coming with the software for details. bh@65: bh@67: """Creates a static web-site with a status report""" bh@65: bh@65: import os bh@65: from optparse import OptionParser bh@65: bh@65: from treepkg.web import Status bh@65: bh@65: def parse_commandline(): bh@65: parser = OptionParser() bh@65: dirname = os.path.dirname(__file__) bh@65: parser.set_defaults(config_file=os.path.join(dirname, "treepkg.cfg")) bh@65: parser.add_option("--config-file", bh@65: help=("The tree packager config file." bh@65: " Default treepkg.cfg")) bh@65: return parser.parse_args() bh@65: bh@65: def create_static_site(treepkg_config, destdir): bh@65: status = Status(treepkg_config=treepkg_config) bh@65: status.create_static_site(destdir) bh@65: bh@65: def main(): bh@65: options, args = parse_commandline() bh@65: create_static_site(options.config_file, args[0]) bh@65: bh@65: main()