Use Magika to more robustly identify text files to send for indexing

- `file-type' doesn't handle mis-labelled files or files without
   extensions well

- Only show supported file types in file selector dialog on Desktop app
  Use Magika to get list of text file extensions. Combine with other
  supported extensions to get complete list of supported file extensions.
  Use it to limit selectable files in the File Open dialog.

  Note: Folder selector will index text files with no extensions as well
This commit is contained in:
Debanjum Singh Solanky
2024-04-09 16:07:18 +05:30
parent f040418cf1
commit f2dc9709b7
3 changed files with 646 additions and 59 deletions

View File

@@ -20,6 +20,6 @@
"axios": "^1.6.4",
"cron": "^2.4.3",
"electron-store": "^8.1.0",
"file-type": "^16.2.0"
"magika": "^0.2.13"
}
}