view bin/createstaticweb.py @ 504:dcec034fed97

Remove the type for the additionals variable in determine_package_version altogether.
author Andre Heinecke <aheinecke@intevation.de>
date Mon, 25 Oct 2010 14:30:08 +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()
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)