MCPcopy Index your code
hub / github.com/simstudioai/sim / parseFile

Method parseFile

apps/sim/lib/file-parsers/pptx-parser.ts:11–29  ·  view source on GitHub ↗
(filePath: string)

Source from the content-addressed store, hash-verified

9
10export class PptxParser implements FileParser {
11 async parseFile(filePath: string): Promise<FileParseResult> {
12 try {
13 if (!filePath) {
14 throw new Error('No file path provided')
15 }
16
17 if (!existsSync(filePath)) {
18 throw new Error(`File not found: ${filePath}`)
19 }
20
21 logger.info(`Parsing PowerPoint file: ${filePath}`)
22
23 const buffer = await readFile(filePath)
24 return this.parseBuffer(buffer)
25 } catch (error) {
26 logger.error('PowerPoint file parsing error:', error)
27 throw new Error(`Failed to parse PowerPoint file: ${(error as Error).message}`)
28 }
29 }
30
31 async parseBuffer(buffer: Buffer): Promise<FileParseResult> {
32 try {

Callers

nothing calls this directly

Calls 4

parseBufferMethod · 0.95
readFileFunction · 0.85
infoMethod · 0.80
errorMethod · 0.80

Tested by

no test coverage detected