Skip to content

Commit 760ab31

Browse files
authored
Merge pull request #733 from rkeshwani/Feature/Additional-File-Loaders-in-Folder-Loader
Issue #731: Add additional optional input parameter for adding additional file loaders
2 parents 7339e38 + d10f380 commit 760ab31

File tree

1 file changed

+34
-1
lines changed
  • packages/components/nodes/documentloaders/Folder

1 file changed

+34
-1
lines changed

packages/components/nodes/documentloaders/Folder/Folder.ts

+34-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,40 @@ class Folder_DocumentLoaders implements INode {
6161
'.csv': (path) => new CSVLoader(path),
6262
'.docx': (path) => new DocxLoader(path),
6363
// @ts-ignore
64-
'.pdf': (path) => new PDFLoader(path, { pdfjs: () => import('pdf-parse/lib/pdf.js/v1.10.100/build/pdf.js') })
64+
'.pdf': (path) => new PDFLoader(path, { pdfjs: () => import('pdf-parse/lib/pdf.js/v1.10.100/build/pdf.js') }),
65+
'.aspx': (path) => new TextLoader(path),
66+
'.asp': (path) => new TextLoader(path),
67+
'.cpp': (path) => new TextLoader(path), // C++
68+
'.c': (path) => new TextLoader(path),
69+
'.cs': (path) => new TextLoader(path),
70+
'.css': (path) => new TextLoader(path),
71+
'.go': (path) => new TextLoader(path), // Go
72+
'.h': (path) => new TextLoader(path), // C++ Header files
73+
'.java': (path) => new TextLoader(path), // Java
74+
'.js': (path) => new TextLoader(path), // JavaScript
75+
'.less': (path) => new TextLoader(path), // Less files
76+
'.ts': (path) => new TextLoader(path), // TypeScript
77+
'.php': (path) => new TextLoader(path), // PHP
78+
'.proto': (path) => new TextLoader(path), // Protocol Buffers
79+
'.python': (path) => new TextLoader(path), // Python
80+
'.py': (path) => new TextLoader(path), // Python
81+
'.rst': (path) => new TextLoader(path), // reStructuredText
82+
'.ruby': (path) => new TextLoader(path), // Ruby
83+
'.rb': (path) => new TextLoader(path), // Ruby
84+
'.rs': (path) => new TextLoader(path), // Rust
85+
'.scala': (path) => new TextLoader(path), // Scala
86+
'.sc': (path) => new TextLoader(path), // Scala
87+
'.scss': (path) => new TextLoader(path), // Sass
88+
'.sol': (path) => new TextLoader(path), // Solidity
89+
'.sql': (path) => new TextLoader(path), //SQL
90+
'.swift': (path) => new TextLoader(path), // Swift
91+
'.markdown': (path) => new TextLoader(path), // Markdown
92+
'.md': (path) => new TextLoader(path), // Markdown
93+
'.tex': (path) => new TextLoader(path), // LaTeX
94+
'.ltx': (path) => new TextLoader(path), // LaTeX
95+
'.html': (path) => new TextLoader(path), // HTML
96+
'.vb': (path) => new TextLoader(path), // Visual Basic
97+
'.xml': (path) => new TextLoader(path) // XML
6598
})
6699
let docs = []
67100

0 commit comments

Comments
 (0)