autoclasstoc.nodes.details_summary
- class autoclasstoc.nodes.details_summary(rawsource='', text='', *children, **attributes)[source]
The summary text to display when a
detailsnode is collapsed.This is rendered as a
<summary>element in HTML. It is not currently compatible with non-HTML output formats.Public Data Attributes:
Inherited from
TextElementchild_text_separatorSeparator for child nodes, used by
astext()method.Inherited from
Elementbasic_attributesTuple of attributes which are defined for every Element-derived class instance and can be safely transferred to a different node.
local_attributesTuple of class-specific attributes that should not be copied with the standard attributes when replacing a node.
list_attributesTuple of attributes that are automatically initialized to empty lists for all nodes.
known_attributesTuple of attributes that are known to the Element base class.
tagnameThe element generic identifier.
child_text_separatorSeparator for child nodes, used by
astext()method.Inherited from
NodeparentBack-reference to the Node immediately containing this Node.
sourcePath or description of the input source which generated this Node.
lineThe line number (1-based) of the beginning of this Node in
source.documentReturn the
documentroot node of the tree containing this Node.Public Methods:
visit_html(node)depart_html(node)Inherited from
TextElement__init__([rawsource, text])Inherited from
Element__init__([rawsource])__repr__()Return repr(self).
shortrepr()__str__()Return str(self).
starttag([quoteattr])endtag()emptytag()__len__()__contains__(key)__getitem__(key)__setitem__(key, item)__delitem__(key)__add__(other)__radd__(other)__iadd__(other)Append a node or a list of nodes to
self.children.astext()Return a string representation of this Node.
non_default_attributes()attlist()get(key[, failobj])hasattr(attr)delattr(attr)setdefault(key[, failobj])has_key(attr)get_language_code([fallback])Return node's language tag.
append(item)extend(item)insert(index, item)pop([i])remove(item)index(item[, start, stop])previous_sibling()Return preceding sibling node or
None.is_not_default(key)update_basic_atts(dict_)Update basic attributes ('ids', 'names', 'classes', 'dupnames', but not 'source') from node or dictionary
dict_.append_attr_list(attr, values)For each element in values, if it does not exist in self[attr], append it.
coerce_append_attr_list(attr, value)First, convert both self[attr] and value to a non-string sequence type; if either is not already a sequence, convert it to a list of one element.
replace_attr(attr, value[, force])If self[attr] does not exist or force is True or omitted, set self[attr] to value, otherwise do nothing.
copy_attr_convert(attr, value[, replace])If attr is an attribute of self, set self[attr] to [self[attr], value], otherwise set self[attr] to value.
copy_attr_coerce(attr, value, replace)If attr is an attribute of self and either self[attr] or value is a list, convert all non-sequence values to a sequence of 1 element and then concatenate the two sequence, setting the result to self[attr].
copy_attr_concatenate(attr, value, replace)If attr is an attribute of self and both self[attr] and value are lists, concatenate the two sequences, setting the result to self[attr].
copy_attr_consistent(attr, value, replace)If replace is True or self[attr] is None, replace self[attr] with value.
update_all_atts(dict_[, update_fun, ...])Updates all attributes from node or dictionary
dict_.update_all_atts_consistantly(dict_[, ...])Updates all attributes from node or dictionary
dict_.update_all_atts_concatenating(dict_[, ...])Updates all attributes from node or dictionary
dict_.update_all_atts_coercion(dict_[, replace, ...])Updates all attributes from node or dictionary
dict_.update_all_atts_convert(dict_[, and_source])Updates all attributes from node or dictionary
dict_.clear()replace(old, new)Replace one child
Nodewith another child or children.replace_self(new)Replace
selfnode withnew, wherenewis a node or a list of nodes.first_child_matching_class(childclass[, ...])Return the index of the first child whose class exactly matches.
first_child_not_matching_class(childclass[, ...])Return the index of the first child whose class does not match.
pformat([indent, level])Return an indented pseudo-XML representation, for test purposes.
copy()Monkey-patch
`nodes.Element.copy`to not copy the_documentattribute.deepcopy()Return a deep copy of self (also copying children).
set_class(name)Add a new class to the "classes" attribute.
note_referenced_by([name, id])Note that this Element has been referenced by its name
nameor idid.is_not_list_attribute(attr)Returns True if and only if the given attribute is NOT one of the basic list attributes defined for all Elements.
is_not_known_attribute(attr)Returns True if and only if the given attribute is NOT recognized by this class.
Inherited from
Node__bool__()Node instances are always true, even if they're empty.
asdom([dom])Return a DOM fragment representation of this Node.
pformat([indent, level])Return an indented pseudo-XML representation, for test purposes.
copy()Return a copy of self.
deepcopy()Return a deep copy of self (also copying children).
astext()Return a string representation of this Node.
setup_child(child)walk(visitor)Traverse a tree of
Nodeobjects, calling thedispatch_visit()method ofvisitorwhen entering each node.walkabout(visitor)Perform a tree traversal similarly to
Node.walk()(which see), except also call thedispatch_departure()method before exiting each node.traverse([condition, include_self, descend, ...])Return list of nodes following
self.findall([condition, include_self, descend, ...])Return an iterator yielding nodes following
self:next_node([condition, include_self, ...])Return the first node in the iterator returned by findall(), or None if the iterable is empty.
Private Data Attributes:
Inherited from
Node_documentPrivate Methods:
Inherited from
Element_dom_node(domroot)Inherited from
Node_fast_findall(cls)Return iterator that only supports instance checks.
_superfast_findall()Return iterator that doesn't check for a condition.
Full Documentation:
- __slotnames__ = []
- html = (<function details_summary.visit_html>, <function details_summary.depart_html>)