#!/usr/bin/env python # Copyright © 1999, 2000 Progiciels Bourbeau-Pinard inc. # François Pinard , 1999. """\ Create HTML pages for various projects. Usage: to-html [OPTION]... [SOURCE]... -C HTMLDIR Create HTML files within HTMLDIR instead of on stdout Each SOURCE is processed specially according to the name or extension. When a directory, find and process the `interesting' files it contains. """ import getopt, re, sys, os import htmlpage os.umask(002) def main(*arguments): if not arguments: sys.stdout.write(__doc__) sys.exit(0) htmldir = None options, arguments = getopt.getopt(arguments, 'C:') for option, value in options: if option == '-C': htmldir = value for argument in arguments: htmlpage.transform_generic(argument, htmldir) if __name__ == '__main__': apply(main, tuple(sys.argv[1:]))