spreadsheet_intelligence.parsers package#

Subpackages#

Module contents#

class spreadsheet_intelligence.parsers.DrawingXMLParser(drawing_root: Element)[source]#

Bases: BaseXMLParser

Parses XML elements related to drawing objects in a spreadsheet.

This class is responsible for parsing XML elements that represent drawing objects such as connectors and shapes in a spreadsheet.

namespaces#

XML namespaces used in the drawing XML.

Type:

dict

xml_root#

Root element of the drawing XML.

Type:

ET.Element

connector_list#

List of parsed connector anchors.

Type:

List[ConnectorAnchorRaw]

shape_list#

List of parsed shape anchors.

Type:

List[ShapeAnchorRaw]

_abc_impl = <_abc._abc_data object>#
parse() Tuple[List[ConnectorAnchorRaw], List[ShapeAnchorRaw]][source]#

Parses the drawing XML to extract connectors and shapes.

Iterates over the XML elements to find and parse connectors and shapes, storing them in their respective lists.

Returns:

A tuple containing lists of parsed connector and shape anchors.

Return type:

Tuple[List[ConnectorAnchorRaw], List[ShapeAnchorRaw]]

class spreadsheet_intelligence.parsers.ThemeXMLParser(theme_root: Element)[source]#

Bases: BaseXMLParser

Parses XML theme elements into a Theme object.

namespaces#

XML namespaces used in the theme.

Type:

dict

theme_el_root#

Root element of the theme XML.

Type:

ET.Element

theme#

Parsed theme object.

Type:

Optional[Theme]

_abc_impl = <_abc._abc_data object>#
parse() Theme[source]#

Parses the theme XML and returns a Theme object.

Returns:

The parsed theme object.

Return type:

Theme