chunklet.document_chunker.processors.pptx_processor
Classes:
-
PPTXProcessor–Processor class for extracting text, tables, charts, notes, and metadata from PPTX files.
PPTXProcessor
Bases: BaseProcessor
Processor class for extracting text, tables, charts, notes, and metadata from PPTX files.
Text content is extracted sequentially slide-by-slide. Structural elements like slide titles are converted to Markdown headers, bullet points maintain indentation, presentation tables are structured into valid Markdown tables, visual charts are transformed into text grids, and presenter notes are appended at the bottom of each slide block.
This processor focuses on extracting core metadata following the OpenXML Document CoreProperties format, matching common practice in office document types.
For more details on PPTX layout elements, refer to the python-pptx documentation:
https://python-pptx.readthedocs.io/
Initializes the PPTXProcessor with a path to the PPTX file and reads the presentation into memory.
Parameters:
-
(file_pathstr) –Path to the PPTX file.
Methods:
-
extract_metadata–Extracts OpenXML Document CoreProperties from the PPTX file
-
extract_text–Yields fully converted Markdown content slide-by-slide from the PPTX archive.
Source code in src/chunklet/document_chunker/processors/pptx_processor.py
extract_metadata
Extracts OpenXML Document CoreProperties from the PPTX file based on the defined METADATA_FIELDS class schema.
Returns:
-
dict[str, Any]–A dictionary containing metadata fields.
Source code in src/chunklet/document_chunker/processors/pptx_processor.py
extract_text
Yields fully converted Markdown content slide-by-slide from the PPTX archive.
Yields:
-
str–Markdown-formatted rendering of each slide.