Formatter for generating plain text from structured text.
Methods
|
|
|
|
End
|
End ( self )
End the processed text document.
|
|
EndItem
|
EndItem ( self, type )
End an element in the environment of type type .
|
|
EndLink
|
EndLink ( self )
End a hyperlink.
|
|
EndList
|
EndList ( self, type )
End a list environment of type type .
|
|
EndStyle
|
EndStyle ( self, style )
End the text style style .
|
|
FinishDefinedTerm
|
FinishDefinedTerm ( self )
Finish the definition of a term in a definition list.
|
|
StartItem
|
StartItem (
self,
type,
label=None,
)
Begin an element to the environment of type type .
-
label
- If type is "ordered list", this is the label for
this list element.
|
|
StartLink
|
StartLink ( self, target )
Being a hyperlink to target .
|
|
StartList
|
StartList ( self, type )
Start a list environment of type type .
|
|
StartStyle
|
StartStyle ( self, style )
Start a new text style style .
|
|
WriteText
|
WriteText ( self, text )
Write ordinary text.
|
|
__IndentTo
|
__IndentTo ( self, col )
|
|
__NextLine
|
__NextLine ( self )
|
|
__Write
|
__Write ( self, text )
|
|
__init__
|
__init__ (
self,
output_file=sys.stdout,
width=78,
indent_size=2,
indent=0,
list_bullet="-",
)
Create a new HTML formatter.
-
output_file
- A file object to which HTML source is
written.
|