class documentation

class Dumper(TextDumper): (source)

View In Hierarchy

Undocumented

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_h Undocumented
Method dump_img Undocumented
Method dump_line Undocumented
Method dump_link Undocumented
Method dump_pre Undocumented
Method dump_table Undocumented
Constant BULLETS Undocumented
Constant HEADING_UNDERLINE Undocumented
Constant TAGS Undocumented

Inherited from Dumper:

Method dump_anchor Undocumented
Method dump_indent Undocumented
Method dump_li 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 encode_text Optional method to encode text elements in the output
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
Constant TEMPLATE_OPTIONS Undocumented
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
def dump(self, tree): (source)
Format a parsetree to text
Parameters
treea parse tree object that supports a visit() method
Returns
a list of lines
def dump_h(self, tag, attrib, strings): (source)

Undocumented

def dump_img(self, tag, attrib, strings=None): (source)

Undocumented

def dump_line(self, tag, attrib, strings=None): (source)

Undocumented

def dump_link(self, tag, attrib, strings=None): (source)

Undocumented

def dump_pre(self, tag, attrib, strings): (source)

Undocumented

def dump_table(self, tag, attrib, strings): (source)

Undocumented

BULLETS = (source)

Undocumented

Value
{UNCHECKED_BOX: '- ☐',
 XCHECKED_BOX: '- ☒',
 CHECKED_BOX: '- ☑',
 MIGRATED_BOX: '- ▷',
 TRANSMIGRATED_BOX: '- ◁',
 BULLET: '-'}
HEADING_UNDERLINE: list[str] = (source)

Undocumented

Value
['=', '-', '^', '"']
TAGS = (source)

Undocumented

Value
{EMPHASIS: ('*', '*'),
 STRONG: ('**', '**'),
 MARK: ('', ''),
 STRIKE: ('', ''),
 VERBATIM: ('``', '``'),
 TAG: ('', ''),
 SUBSCRIPT: ('\\ :sub:`', '`\\ '),
...