class Dumper(TextDumper): (source)
Undocumented
Static Method | encode_text |
Optional method to encode text elements in the output |
Method | dump |
Format a parsetree to text @param tree: a parse tree object that supports a visit() method @returns: a list of lines |
Method | dump_anchor |
Undocumented |
Method | dump_code |
Undocumented |
Method | dump_h |
Undocumented |
Method | dump_img |
Undocumented |
Method | dump_li |
Undocumented |
Method | dump_line |
Undocumented |
Method | dump_link |
Undocumented |
Method | dump_ol |
Undocumented |
Method | dump_pre |
Undocumented |
Method | dump_table |
Undocumented |
Method | dump_ul |
Undocumented |
Method | is_supported_image |
Undocumented |
Constant | BULLETS |
Undocumented |
Constant | SECTIONING |
Undocumented |
Constant | TAGS |
Undocumented |
Constant | TEMPLATE_OPTIONS |
Undocumented |
Instance Variable | document_type |
Undocumented |
Inherited from Dumper
:
Method | dump_indent |
Undocumented |
Method | dump_list |
Undocumented |
Method | dump_object_fallback |
Method to serialize objects that do not have their own handler for this format. @implementation: must be implemented in sub-classes |
Method | dump_td |
Undocumented |
Method | dump_thead |
Undocumented |
Method | dump_trow |
Undocumented |
Inherited from DumperClass
(via Dumper
):
Method | __init__ |
Undocumented |
Method | append |
Convenience function to open a tag, append text and close it immediatly. |
Method | dump_object |
Dumps objects defined by InsertedObjectType |
Method | end |
No summary |
Method | get_lines |
Return the dumped content as a list of lines Should only be called after closing the top level element |
Method | isrtl |
No summary |
Method | prefix_lines |
No summary |
Method | start |
Start formatted region |
Method | text |
Append text @param text: text to be appended as string @implementation: optional for subclasses |
Instance Variable | context |
the stack of open tags maintained by this class. Can be used in dump_ methods to inspect the parent scope of the format. Elements on this stack have "tag", "attrib" and "text" attributes. Keep in mind that the parent scope is not yet complete when a tag is serialized. |
Instance Variable | linker |
the (optional) Linker object, used to resolve links |
Instance Variable | template_options |
a ConfigDict with options that may be set in a template (so inherently not safe !) to control the output style. Formats using this need to define the supported keys in the dict TEMPLATE_OPTIONS. |
Instance Variable | _text |
Undocumented |
zim.formats.DumperClass.encode_text
Parameters | |
tag | formatting tag |
text | text to be encoded |
Returns | |
encoded text | |
Note | |
Do not apply text encoding in the dump_ methods, the list of strings given there may contain prefix and postfix formatting of nested tags. | |
Unknown Field: implementation | |
optional, default just returns unmodified input |
zim.formats.DumperClass.dump
Parameters | |
tree | a parse tree object that supports a visit() method |
Returns | |
a list of lines |
zim.formats.plain.Dumper.BULLETS
Undocumented
Value |
|
Undocumented
Value |
|
zim.formats.plain.Dumper.TAGS
Undocumented
Value |
|
zim.formats.DumperClass.TEMPLATE_OPTIONS
Undocumented
Value |
|