Table of Contents

Class: StructuredTextConverter ../HappyDoc-r2_1/happydoclib/docstring/docstring_StructuredText.py

StructuredText format converter.

This converter supports translating StructuredText (see the StructuredText package) input to HTML output.

Base Classes   
happydoclib.happydocstring.HappyDocStringConverterBase
Methods   
_cleanup
_testOutputFormat
_unquoteExamplesInST
_unquoteHTML
convert
quote
  _cleanup 
_cleanup (
        self,
        inputText,
        extractBody=re.compile( '<body>(.*)</body>', re.MULTILINE | re.DOTALL ),
        )

Clean converted text and return new value.

  _testOutputFormat 
_testOutputFormat ( self,  outputFormat )

Exceptions   
ValueError('Unrecognized output format "%s" for %s.' %( outputFormat, self.__class__.__name__, ) )
  _unquoteExamplesInST 
_unquoteExamplesInST ( self,  st )

Unquote the characters in all example paragraphs in the ST tree.

  _unquoteHTML 
_unquoteHTML (
        self,
        text,
        character_entities=(( re.compile( '&amp;' ), '&' ), ( re.compile( "&lt;" ), '<' ), ( re.compile( "&gt;" ), '>' ), ( re.compile( '&quot;' ), '"' ) ),
        )

Reverse the quoting process for character entities.

  convert 
convert (
        self,
        inputText,
        outputFormat,
        level=3,
        *args,
        *namedArgs,
        )

Returns the inputText data translated into the outputFormat.

Parameters:

inputText
String or other sequence of characters to be converted. This string should be in the format advertised by the docstring converter.
outputFormat
String defined by the docstring converter class to represent a supported output scheme. This value is converter-specific, and not all converters will support the same output formats.
level=3
Beginning indention level for the text. This controls what type of header elements are created among other behaviors.
  quote 
quote (
        self,
        inputText,
        outputFormat,
        *args,
        *namedArgs,
        )

Returns the inputText quoted in a way that special characters are escaped.

Parameters:

inputText
String or other sequence of characters to be converted. This string should be in the format advertised by the docstring converter.
outputFormat
String defined by the docstring converter class to represent a supported output scheme. This value is converter-specific, and not all converters will support the same output formats.
*args
Additional, converter-specific, positional arguments.
**namedArgs
Additional, converter-specific, named arguments.

Table of Contents

This document was automatically generated on Sat Aug 24 16:57:29 2002 by HappyDoc version 2.1