Index office documents (#340)

👌
This commit is contained in:
demig00d
2024-01-20 14:01:43 +03:00
committed by GitHub
parent b86bbf8407
commit e618d4ca47
3 changed files with 40 additions and 3 deletions

View File

@@ -174,6 +174,11 @@ export function isFilePDF(path: string): boolean {
return getExtension(path) === 'pdf'
}
export function isFileOffice(path: string): boolean {
const ext = getExtension(path)
return ext === 'docx' || ext === 'xlsx'
}
export function isFilePlaintext(path: string): boolean {
return [...settings.indexedFileTypes, 'md'].some(t => path.endsWith(`.${t}`))
}