spreadsheet_intelligence.core package#
Submodules#
spreadsheet_intelligence.core.base_loader module#
- class spreadsheet_intelligence.core.base_loader.BaseLoader(file_path: str)[source]#
Bases:
ABC
Abstract base class for core loader.
- file_path#
The path to the file to be loaded.
- Type:
str
- abstractmethod load()[source]#
Abstract method to load the file. This method should be implemented by subclasses.
- _abc_impl = <_abc._abc_data object>#
spreadsheet_intelligence.core.excel_autoshape_loader module#
- class spreadsheet_intelligence.core.excel_autoshape_loader.ExcelAutoshapeLoader(file_path: str)[source]#
Bases:
BaseLoader
A loader class for extracting and converting autoshapes from an Excel file.
- file_path#
Path to the Excel file.
- Type:
str
- drawing_xml_path#
Path to the drawing XML within the Excel file.
- Type:
str
- theme_xml_path#
Path to the theme XML within the Excel file.
- Type:
str
- xml_contents#
In-memory XML contents of the specified files.
- Type:
dict
- drawing_root#
Root element of the drawing XML.
- Type:
Element
- theme_root#
Root element of the theme XML.
- Type:
Element
- connector_list#
List of raw connector data.
- Type:
list[ConnectorAnchorRaw]
- shape_list#
List of raw shape data.
- Type:
list[ShapeAnchorRaw]
- converted_connector_list#
List of converted connectors.
- Type:
list[BentConnector3]
- id_counter#
Counter for assigning unique IDs to converted elements.
- Type:
int
- load()[source]#
Loads and processes the Excel autoshapes by parsing, converting, and generating prompts.
- export() str [source]#
Exports the generated prompt as a JSON string.
- Returns:
The JSON string of the prompt.
- Return type:
str
- _abc_impl = <_abc._abc_data object>#
Module contents#
- class spreadsheet_intelligence.core.BaseLoader(file_path: str)[source]#
Bases:
ABC
Abstract base class for core loader.
- file_path#
The path to the file to be loaded.
- Type:
str
- _abc_impl = <_abc._abc_data object>#
- class spreadsheet_intelligence.core.ExcelAutoshapeLoader(file_path: str)[source]#
Bases:
BaseLoader
A loader class for extracting and converting autoshapes from an Excel file.
- file_path#
Path to the Excel file.
- Type:
str
- drawing_xml_path#
Path to the drawing XML within the Excel file.
- Type:
str
- theme_xml_path#
Path to the theme XML within the Excel file.
- Type:
str
- xml_contents#
In-memory XML contents of the specified files.
- Type:
dict
- drawing_root#
Root element of the drawing XML.
- Type:
Element
- theme_root#
Root element of the theme XML.
- Type:
Element
- connector_list#
List of raw connector data.
- Type:
list[ConnectorAnchorRaw]
- shape_list#
List of raw shape data.
- Type:
list[ShapeAnchorRaw]
- converted_connector_list#
List of converted connectors.
- Type:
list[BentConnector3]
- id_counter#
Counter for assigning unique IDs to converted elements.
- Type:
int
- _abc_impl = <_abc._abc_data object>#
- export() str [source]#
Exports the generated prompt as a JSON string.
- Returns:
The JSON string of the prompt.
- Return type:
str
- load()[source]#
Loads and processes the Excel autoshapes by parsing, converting, and generating prompts.
- connector_list: list[ConnectorAnchorRaw]#
- shape_list: list[ShapeAnchorRaw]#
- converted_connector_list: list[BentConnector3]#