PageRenderTime 6ms CodeModel.GetById 2ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/doc/gendocs.py

http://pyjamas.googlecode.com/
Python | 59 lines | 44 code | 1 blank | 14 comment | 11 complexity | afd0ffff2794a71ddf09a74c4ec5efa3 MD5 | raw file
 1
 2"""

 3Usage:

 4

 5epydoc [--html|--pdf] [-o DIR] [--parse-only|--introspect-only] [-v|-q]

 6       [--name NAME] [--url URL] [--docformat NAME] [--graph GRAPHTYPE]

 7       [--inheritance STYLE] [--config FILE] OBJECTS...

 8OBJECTS...

 9A list of the Python objects that should be documented. Objects can be specified using dotted names (such as os.path), module filenames (such as epydoc/epytext.py), or package directory names (such as epydoc/). Packages are expanded to include all sub-modules and sub-packages.

10

11--html    Generate HTML output. (default)

12--pdf    Generate Adobe Acrobat (PDF) output, using LaTeX.

13-o DIR, --output DIR, --target DIR

14     The output directory.

15--parse-only, --introspect-only

16     By default, epydoc will gather information about each Python object using two methods: parsing the object's source code; and importing the object and directly introspecting it. Epydoc combines the information obtained from these two methods to provide more complete and accurate documentation. However, if you wish, you can tell epydoc to use only one or the other of these methods. For example, if you are running epydoc on untrusted code, you should use the --parse-only option.

17-v, -q    Increase (-v) or decrease (-q) the verbosity of the output. These options may be repeated to further increase or decrease verbosity. Docstring markup warnings are supressed unless -v is used at least once.

18--name NAME    The documented project's name.

19--url URL    The documented project's URL.

20--docformat NAME

21     The markup language that should be used by default to process modules' docstrings. This is only used for modules that do not define the special __docformat__ variable; it is recommended that you explicitly specify __docformat__ in all your modules.

22--graph GRAPHTYPE

23     

24Include graphs of type GRAPHTYPE in the generated output. Graphs are generated using the Graphviz dot executable. If this executable is not on the path, then use --dotpath to specify its location. This option may be repeated to include multiple graph types in the output. To include all graphs, use --graph all. The available graph types are:

25classtree: displays each class's base classes and subclasses;

26callgraph: displays the callers and callees of each function or method. These graphs are based on profiling information, which must be specified using the --pstate option.

27umlclass: displays each class's base classes and subclasses, using UML style. Methods and attributes are listed in the classes where they are defined. If type information is available about attributes (via the @type field), then those types are displayed as separate classes, and the attributes are displayed as associations.

28--inheritance STYLE

29     

30The format that should be used to display inherited methods, variables, and properties. Currently, three styles are supported. To see an example of each style, click on it:

31grouped: Inherited objects are gathered into groups, based on which class they are inherited from.

32listed: Inherited objects are listed in a short list at the end of the summary table.

33included: Inherited objects are mixed in with non-inherited objects.

34--config FILE    Read the given configuration file, which can contain both options and Python object names. This option may be used multiple times, if you wish to use multiple configuration files. See Configuration Files for more information.

35"""
36
37import glob
38from os.path import abspath, pathsep
39import os
40os.environ['PYTHONPATH'] += (pathsep + abspath('../stubs') + 
41                             pathsep + abspath('../library') + 
42                             pathsep + abspath('../addons'))
43paths = glob.glob(abspath('../library/*.py'))+glob.glob(abspath('../addons/*.py'))
44command = ['epydoc.py', "-v",  "-v",
45           '--parse-only',
46           '--html',
47           '-o', 'api', 
48           '--name', 'pyjamas', 
49           '--url', 'http://pyjamas.pyworks.org/', 
50           ]+list(paths)
51
52def quote_shell(x):
53    if x.find(" ") != -1:
54        return '"'+x+'"'
55    return x
56commandString = ' '.join(map(quote_shell, command))
57from os import system
58print '>>', commandString
59system(commandString)