MCPcopy Create free account
hub / github.com/FastMAS/KVCOMM / parse

Method parse

KVCOMM/tools/reader/readers.py:154–167  ·  view source on GitHub ↗
(self, file_path: Path)

Source from the content-addressed store, hash-verified

152
153class PPTXReader(Reader):
154 def parse(self, file_path: Path) -> str:
155 logger.info(f"Reading PowerPoint file from {file_path}.")
156 try:
157 pres = Presentation(str(file_path))
158 text = []
159 for slide_idx, slide in enumerate(pres.slides):
160 text.append(f"Slide {slide_idx + 1}:\n")
161 for shape in slide.shapes:
162 if hasattr(shape, "text"):
163 text.append(shape.text)
164 return "\n".join(text)
165 except Exception as e:
166 logger.info(f"Error reading PowerPoint file: {e}")
167 return "Error reading PowerPoint file."
168
169class ExcelReader(Reader):
170 def parse(self, file_path: Path) -> str:

Callers

nothing calls this directly

Calls 1

joinMethod · 0.80

Tested by

no test coverage detected