Mercurial > treepkg
view bin/createstaticweb.py @ 481:9c7e1d957d6b
sawmill: Not all displayed times are in UTC so the
general 'Z's at all times/dates are removed. Now
it is only mentioned that the times in the main
table are in UTC. To reduce the optical noise
this is done by simple comments in the date rows.
author | Sascha Teichmann <teichmann@intevation.de> |
---|---|
date | Sat, 18 Sep 2010 07:50:53 +0000 |
parents | ef87d30468b6 |
children |
line wrap: on
line source
#! /usr/bin/python # Copyright (C) 2007, 2008, 2009 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. """Creates a static web-site with a status report""" import sys import os import treepkgcmd from treepkg.options import create_parser from treepkg.web import Status def parse_commandline(): parser = create_parser() parser.set_defaults(status_template="status-by-startdate.html") parser.set_defaults(show_logs="build_log.txt.gz") parser.add_option("--status-template", help=("The template file to use for the status page." " Relative filenames are interpreted" " relative to the web subdirectory." " Default is status-by-startdate.html.")) parser.add_option("--show-logs", help=("A comma seperated list of filenames of the" " logs that should be included in the status page." " Valid names are filenames of the files" " in the log dir of a package. e.g." " --show-logs=tarball_log.txt,dpkg_source.txt" " Default is build_log.txt.gz")) return parser.parse_args() def create_static_site(treepkg_config, status_template, show_logs, destdir): status = Status(treepkg_config=treepkg_config, template=status_template, logs=show_logs.split(",")) status.create_static_site(destdir) def main(): options, args = parse_commandline() create_static_site(options.config_file, options.status_template, options.show_logs, args[0]) main()