From bc891834b827991be2071d50d8d09519637fc26d Mon Sep 17 00:00:00 2001 From: David Turner Date: Tue, 8 May 2001 07:48:33 +0000 Subject: [PATCH] * docs/docmaker.py: updated the DocMaker script in order to add command line options (--output,--prefix,--title), fix the erroneous line numbers reported during errors and warnings, and other formatting issues.. --- docs/docmaker.py | 207 +++++++++++++++++++++++++++++++++++------------ 1 file changed, 154 insertions(+), 53 deletions(-) diff --git a/docs/docmaker.py b/docs/docmaker.py index d09a64279..08ff445ed 100644 --- a/docs/docmaker.py +++ b/docs/docmaker.py @@ -1,18 +1,46 @@ #!/usr/bin/env python # -# DocMaker is a very simple program used to generate HTML documentation -# from the source files of the FreeType packages. +# DocMaker 0.1 (c) 2000-2001 David Turner +# +# DocMaker is a very simple program used to generate the API Reference +# of programs by extracting comments from source files, and generating +# the equivalent HTML documentation. +# +# DocMaker is very similar to other tools like Doxygen, with the +# following differences: +# +# - it is written in Python (so it's slow, but easy to maintain and +# improve) +# +# - the comment syntax used by DocMaker is simpler and makes for +# clearer comments +# +# Of course, it doesn't have all the goodies of most similar tools, +# (e.g. C++ class hierarchies), but hey, it's only 2000 lines of +# python +# +# DocMaker is mainly used to generate the API references of several +# FreeType packages. # -# I should really be using regular expressions to do this, but hey, -# i'm too lazy right now, and the damn thing seems to work :-) # - David # -import fileinput, sys, string, glob +import fileinput, sys, os, string, glob, getopt # The Project's title. This can be overridden from the command line with -# an option. -project_title = "Project" +# the options "-t" or "--title" +project_title = "Project" + +# The project's filename prefix. This can be set from the command line with +# the options "-p" or "--prefix" +# +project_prefix = "" + +# The project's documentation output directory. This can be set from the +# command line with the options "-o" or "--output" +# +output_dir = None + # The following defines the HTML header used by all generated pages. # @@ -22,7 +50,7 @@ html_header_1 = """\ """ html_header_2= """ API Reference - +