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

Method parse

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

Source from the content-addressed store, hash-verified

37
38class PDFReader(Reader):
39 def parse(self, file_path: Path) -> str:
40 logger.info(f"Reading PDF file from {file_path}.")
41 content = PyPDF2.PdfReader(file_path)
42 text = ""
43 for page_idx in range(len(content.pages)):
44 text += f'Page {page_idx + 1}\n' + content.pages[page_idx].extract_text()
45 return text
46
47class DOCXReader(Reader):
48 def parse(self, file_path: Path) -> str:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected