WebStack

Annotated apidocs.py

200:98ddf103692c
2004-08-28 paulb [project @ 2004-08-28 17:01:14 by paulb] Fixed fields from body retrieval for Zope since Zope mixes plain strings with FileUpload objects.
paulb@182 1
#!/usr/bin/env python
paulb@182 2
paulb@182 3
"Make the API documentation."
paulb@182 4
paulb@182 5
import pydoc
paulb@182 6
import os, sys
paulb@182 7
paulb@182 8
if __name__ == "__main__":
paulb@182 9
paulb@182 10
    # The list of packages should coincide with that found in setup.py.
paulb@182 11
paulb@182 12
    names = [
paulb@182 13
        "WebStack", "WebStack.__init__",
paulb@182 14
        "WebStack.BaseHTTPRequestHandler", "WebStack.CGI", "WebStack.Generic",
paulb@182 15
        "WebStack.JavaServlet", "WebStack.ModPython", "WebStack.Twisted",
paulb@182 16
        "WebStack.Webware",
paulb@182 17
        "WebStack.Adapters", "WebStack.Adapters.__init__",
paulb@182 18
        "WebStack.Adapters.BaseHTTPRequestHandler", "WebStack.Adapters.CGI",
paulb@182 19
        "WebStack.Adapters.Generic", "WebStack.Adapters.JavaServlet",
paulb@182 20
        "WebStack.Adapters.ModPython", "WebStack.Adapters.Twisted",
paulb@182 21
        "WebStack.Adapters.Webware",
paulb@182 22
        "WebStack.Helpers", "WebStack.Helpers.__init__",
paulb@182 23
        "WebStack.Helpers.Auth", "WebStack.Helpers.Environment",
paulb@182 24
        "WebStack.Helpers.Request", "WebStack.Helpers.Response",
paulb@182 25
        "WebStack.Resources", "WebStack.Resources.__init__",
paulb@182 26
        "WebStack.Resources.Login", "WebStack.Resources.LoginRedirect"
paulb@182 27
        ]
paulb@182 28
paulb@182 29
    dirname = "apidocs"
paulb@182 30
paulb@182 31
    # Set the PYTHONPATH to find the package.
paulb@182 32
paulb@182 33
    sys.path.insert(0, os.getcwd())
paulb@182 34
paulb@182 35
    # Make the documentation directory if necessary.
paulb@182 36
paulb@182 37
    if not os.path.exists(dirname):
paulb@182 38
        print "Making", dirname
paulb@182 39
        os.mkdir(dirname)
paulb@182 40
paulb@182 41
    # Change into the directory - pydoc.writedoc depends on that.
paulb@182 42
paulb@182 43
    os.chdir(dirname)
paulb@182 44
paulb@182 45
    for name in names:
paulb@182 46
        pydoc.writedoc(name, forceload=1)
paulb@182 47
paulb@182 48
# vim: tabstop=4 expandtab shiftwidth=4