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

Method parse

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

Source from the content-addressed store, hash-verified

46
47class DOCXReader(Reader):
48 def parse(self, file_path: Path) -> str:
49 logger.info(f"Reading DOCX file from {file_path}.")
50 content = docx.Document(str(file_path))
51 text = ""
52 for i, para in enumerate(content.paragraphs):
53 text += f'Page {i + 1}:\n' + para.text
54 return text
55
56class JSONReader(Reader):
57 def parse_file(file_path: Path) -> list:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected