![]() The library uses Rollup (easier to setup with Wasm and web workers), while the plugin uses esbuild. ![]() The plugin itself, which is a wrapper around the library and exposes some useful options to the userĮach project is in its own folder, and has its own package.json and node_modules.The text extraction library, which does the actual work.If you wish to submit a PR, please open an issue first so we can discuss the feature. While this plugin is first developed for Omnisearch, it's totally agnostic and I'd like it to become a community effort. Subsequent calls to extractText() will return the cached text. Note that Text Extractor only extract texts on demand, when you call extractText() on a file, to avoid unnecessary resource consumption. Add this type somewhere in your code export type TextExtractorApi = // And use it like this const text = await getTextExtractor ( ) ?. Using Text Extractor as a dependency for your plugin The API functions likely won't change, but this is still a beta. I'm dogfooding this plugin with Omnisearch. This way, other plugins can use it without having to worry about the implementation details, and without having to needlessly consume resources. With this plugin, I hope to provide a unified way to extract texts from images & PDFs, and make it available to other plugins. Text extraction is a useful feature, but it is not easy to implement, and consumes a lot of resources. You can also install it manually by downloading the latest release from the releases page or by using the BRAT plugin manager. Text Extractor is available on the Obsidian community plugins repository. ![]() If not, an empty string will be returned. Since text extraction does not work on mobile, the plugin will use the synced cached texts if available. Those files can be synced between your devices. The plugin caches the extracted texts as local small. All the processing is done locally, but the language files needed by the underlying OCR library (Tesseract) are downloaded on demand.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |