HappyDoc Generated Documentation HappyDoc3-r3_1/happydoclib/docstring

HappyDoc3-r3_1 / happydoclib / docstring 

Python docstring converter plugins.

How does an author write documentation so that it will be marked up and look fancy? This is a perennial question for Python users, and seems to have introduced a roadblock into the development of more robust and useful documentation tools. HappyDoc stands firmly on the fence and does not attempt to resolve the issue.

By separating the docstring converter and formatter classes from the docset classes, HappyDoc allows a user to create their own converter and formatter to interpret comments in any way they see fit.

The docstring converter plugins are responsible for translating text from the input markup syntax to the output format. This translation is formatter independent, so that the same HTML conversion might be used by mutliple HTML formatters. It is, however, format dependent, so that HTML output should not be used by a plain text formatter.

The default for the HTMLTableFormatter (the default formatter for HappyDoc) is to treat __doc__ strings as StructuredTextNG. This is the "Next Generation" version of the original StructuredText markup syntax. See also the StructuredText package for a description of the rules for using StructuredText.

Don't like StructuredText? Write your own docstring converter that uses something different and drop it into place. Refer to the happydocstring.py module for the base class and APIs required of a docstring converter. If a defacto (or otherwise) standard structured markup for Python __doc__ strings emerges, HappyDoc will be updated to use that format by default.

Functions   
  getConverterFactory 
getConverterFactory ( formatType )

Returns the factory for a docstring converter for formatType text.

Parameters:
formatType
A string representing the name of the input text type. If this string does not match a registered docstring converter input format, a ValueError exception will be raised.
Exceptions   

ValueError( 'Unrecognized docstring format type "%s"' % formatType )

  DocStringLoader 
DocStringLoader ()
  getConverterFactoryForFile 
getConverterFactoryForFile ( filename )

Returns the factory for a docstring converter for an external file.

Parameters:
filename
The name of the external file to be examined.
Classes   

DocStringLoaderSingleton

Load pluggable docstring converters.

Python files   

MML.py

An MML StructuredText formatter.

docstring_ClassicStructuredText.py

Docstring converter for original StructuredText format.

docstring_PlainText.py

Plan text format converter.

docstring_RawText.py

Raw (pass-through) docstring converter.

docstring_StructuredText.py

Docstring converter for StructuredText format.

test_docstring_StructuredText.py

Docstring converter for StructuredText format.

Subdirectories   

StructuredText


This document was automatically generated Tue Dec 5 08:31:02 2006 by HappyDoc version 3.1