comparison createstaticweb.py @ 65:bebe06ff4bd6

add createstaticweb.py
author Bernhard Herzog <bh@intevation.de>
date Wed, 11 Apr 2007 17:03:33 +0200
parents
children 517253fa987f
comparison
equal deleted inserted replaced
64:2ff966839859 65:bebe06ff4bd6
1 #! /usr/bin/python2.4
2 # Copyright (C) 2007 by Intevation GmbH
3 # Authors:
4 # Bernhard Herzog <bh@intevation.de>
5 #
6 # This program is free software under the GPL (>=v2)
7 # Read the file COPYING coming with the software for details.
8
9 """Creates static a static web-site with a status report"""
10
11 import os
12 from optparse import OptionParser
13
14 from treepkg.web import Status
15
16 def parse_commandline():
17 parser = OptionParser()
18 dirname = os.path.dirname(__file__)
19 parser.set_defaults(config_file=os.path.join(dirname, "treepkg.cfg"))
20 parser.add_option("--config-file",
21 help=("The tree packager config file."
22 " Default treepkg.cfg"))
23 return parser.parse_args()
24
25 def create_static_site(treepkg_config, destdir):
26 status = Status(treepkg_config=treepkg_config)
27 status.create_static_site(destdir)
28
29 def main():
30 options, args = parse_commandline()
31 create_static_site(options.config_file, args[0])
32
33 main()
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)