Home | Trees | Index | Help |
---|
|
Functions for parsing, processing, and formatting Python structured text.
See "Structured Text Formatting Rules":http://www.python.org/sigs/doc-sig/stext.html for more information.
|
|||
Formatter | Interface for output formatters for the 'StructuredTextProcessor'. | ||
TextFormatter | Formatter for generating plain text from structured text. | ||
HtmlFormatter | Formatter for generating HTML from structured text. | ||
StructuredTextProcessor | Parser and formatter for Python structured text. |
|
|||
escape_html_entities(text)
Return 'text' with special characters converted to HTML entities. |
|||
__format(text,
formatter)
Process structured text 'text' with 'formatter'. |
|||
to_html(structured_text)
Return 'structured_text' formatted as HTML. |
|||
to_text(structured_text,
width=78,
indent=0)
Return 'structured_text' formatted as plain text. |
|||
get_first(structured_text)
Return the first line of 'structured_text'. |
|||
get_rest(structured_text)
Return the contents of 'structured_text' minus the first line. |
|||
get_paragraphs(structured_text)
Split 'structured_text' into paragraphs. |
|||
get_first_paragraph(structured_text)
Return the first paragraph of 'structured_text'. |
|||
__entity_char_replacement(match, replacement_map={'\xa3': '£', '\xa7': '§', '\xab': '«', '\xaf': '¯', '\xb3': '³', '\xb7': '·', '\xbb': '»', '<': '<', '\xbf': '¿', '\xc3': 'Ã', '\xc7': 'Ç', '\xcb': 'Ë', '\xcf': 'Ï', '\xd3': 'Ó', '\xd7': '×', '\xdb': 'Û', '\xdf': 'ß', '\xe3': 'ã', '\xe7': 'ç', '\xeb': 'ë', '\xef': 'ï', '\xf3': 'ó', '\xf7': '÷', '\xfb': 'û', '\xff': 'ÿ', '\xa0': ' ', '\xa4': '¤', '\xa8': '¨', '\xac': '¬', '\xb0': '°', '\xb4': '´', '\xb8': '¸', '\xbc': '¼', '\xc0': 'À', '\xc4': 'Ä', '\xc8': 'È', '\xcc': 'Ì', '\xd0': 'Ð', '\xd4': 'Ô', '\xd8': 'Ø', '\xdc': 'Ü', '\xe0': 'à', '\xe4': 'ä', '\xe8': 'è', '\xec': 'ì', '\xf0': 'ð', '\xf4': 'ô', '\xf8': 'ø', '\xfc': 'ü', '\xa1': '¡', '"': '"', '\xa5': '¥', '&': '&', '\xa9': '©', '\xad': '­', '\xb1': '±', '\xb5': 'µ', '\xb9': '¹', '\xbd': '½', '>': '>', '\xc1': 'Á', '\xc5': 'Å', '\xc9': 'É', '\xcd': 'Í', '\xd1': 'Ñ', '\xd5': 'Õ', '\xd9': 'Ù', '\xdd': 'Ý', '\xe1': 'á', '\xe5': 'å', '\xe9': 'é', '\xed': 'í', '\xf1': 'ñ', '\xf5': 'õ', '\xf9': 'ù', '\xfd': 'ý', '\xa2': '¢', '\xa6': '¦', '\xaa': 'ª', '\xae': '®', '\xb2': '²', '\xb6': '¶', '\xba': 'º', '\xbe': '¾', '\xc2': 'Â', '\xc6': 'Æ', '\xca': 'Ê', '\xce': 'Î', '\xd2': 'Ò', '\xd6': 'Ö', '\xda': 'Ú', '\xde': 'Þ', '\xe2': 'â', '\xe6': 'æ', '\xea': 'ê', '\xee': 'î', '\xf2': 'ò', '\xf6': 'ö', '\xfa': 'ú', '\xfe': 'þ'}) |
|
|||
html_help_text | |||
__entity_char_regex | |||
__paragraph_regexp | |||
_verbatim_regexp | |||
long_options | |||
formatter | |||
processor | |||
inputs | |||
character | |||
entity |
|
|
|
|
Return 'structured_text' formatted as plain text. 'width' -- The width of the text (including the indentation). 'indent' -- The width of the block indentation of the formatted output. |
Return the first line of 'structured_text'. By convention, the first line of a structured text description is a short summary. |
|
Split 'structured_text' into paragraphs. 'structured_text' -- A string consisting of structured text. returns -- A sequence of pagraphs of structured text. Each element in the sequence corresponds to a successive pagraph in the 'structured_text'. If 'structured_text' is the empty string, the sequence returned will consist of a single paragraph, itself empty. |
Return the first paragraph of 'structured_text'. 'structured_text' -- A string consisting of structured text. returns -- A string of structured text that is the first paragraph of the 'structured_text'. |
|
|
html_help_text
|
__entity_char_regex
|
__paragraph_regexp
|
_verbatim_regexp
|
long_options
|
formatter
|
processor
|
inputs
|
character
|
entity
|
Home | Trees | Index | Help |
---|
Generated by Epydoc 3.0alpha2 on Fri Sep 28 00:57:30 2007 | http://epydoc.sf.net |