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

Class DOCXReader

KVCOMM/tools/reader/readers.py:47–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45 return text
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 1

readers.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected