Mercurial > treepkg > treepkg
diff bin/createstaticweb.py @ 372:ef87d30468b6
Added the option to expose additional log files from the log directory.
To enable this one can either set a build_logs value in the staticweb.cfg
or call createstaticweb with the parameter --show-logs. Default behavior is
to only publish the build log, although the title is now capitalized.
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Mon, 21 Jun 2010 08:23:30 +0000 |
parents | 85b5667f543e |
children |
line wrap: on
line diff
--- a/bin/createstaticweb.py Tue Jun 15 10:56:44 2010 +0000 +++ b/bin/createstaticweb.py Mon Jun 21 08:23:30 2010 +0000 @@ -18,21 +18,31 @@ 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, destdir): - status = Status(treepkg_config=treepkg_config, template=status_template) +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()