MCPcopy Create free account
hub / github.com/Zoo-Code-Org/Zoo-Code / extractTextFromPDF

Function extractTextFromPDF

src/integrations/misc/extract-text.ts:11–15  ·  view source on GitHub ↗
(filePath: string)

Source from the content-addressed store, hash-verified

9import { DEFAULT_LINE_LIMIT } from "../../core/prompts/tools/native-tools/read_file"
10
11async function extractTextFromPDF(filePath: string): Promise<string> {
12 const dataBuffer = await fs.readFile(filePath)
13 const data = await pdf(dataBuffer)
14 return addLineNumbers(data.text)
15}
16
17async function extractTextFromDOCX(filePath: string): Promise<string> {
18 const result = await mammoth.extractRawText({ path: filePath })

Callers

nothing calls this directly

Calls 2

addLineNumbersFunction · 0.85
readFileMethod · 0.45

Tested by

no test coverage detected