scambier / obsidian-text-extractor

A (companion) plugin to facilitate the extraction of text from images (OCR) and PDFs.
GNU General Public License v3.0
304 stars 15 forks source link

[Feature request] Support Office documents #10

Open scambier opened 1 year ago

scambier commented 1 year ago

Is your feature request related to a problem? Please describe.

Support Office documents like docx, .pptx, .xlsx

khesed commented 1 year ago

I think there are at least two approach options. The first could be converting docx, pptx, and xlsx files to images for each slide/page and then use OCR on that. This could be done with the unoconv library.

The second could be using an interface that exposes the internal data of those filetypes, like the python-pptx library. This would be more akin to just extending the search function of Obsidian in general, which may be out of the scope of the project and more in the scope of the Omnisearch plugin. So, I think the first approach might be more reasonable for this project.

khesed commented 1 year ago

For the second approach, there are some individual libraries in pure JS for each file extension which expose internal data, like js-pptx and js-ppt.

And there are ones which try to do it all, like any-text, but then it's needed to dig through the dependencies to see if it's really pure JS.

I guess another approach could be finding Office document converters to other extensions, then interpreting that. e.g. This pptx-to-html converter could be another option.

Would love to hear your thoughts on which might be more feasible