OCR bases

This commit is contained in:
Simon Cambier
2022-10-30 20:45:55 +01:00
parent 10019513ba
commit 1cd151b1fd
3 changed files with 50 additions and 2 deletions

View File

@@ -188,6 +188,12 @@ export function isFileIndexable(path: string): boolean {
)
}
export function isFileImage(path: string): boolean {
return (
path.endsWith('.png') || path.endsWith('.jpg') || path.endsWith('.jpeg')
)
}
export function isFilePlaintext(path: string): boolean {
return getPlaintextExtensions().some(t => path.endsWith(`.${t}`))
}