Some developers cringe at the mere thought of opening a terminal window. For the uninitiated it can be…Read more
You can install the whole library via npm and it’s a pretty simple install. The thing is only a few KB large and it comes with a JS file that you can browse on GitHub.
Imgclip uses the Tesseract.js library for automating image processing and pulling text via OCR. It’s one of the most powerful OCR libraries to date, and it’s completely open source just like imgclip.
I think I’m most impressed with the quality and speed of this tool. It really does work to pull accurate text and it’s one of the simplest tools to use.
The imgclip command should be run directly in the terminal, followed by the relative path to the image. You can also add four options onto the end to customize the output.
-h, --help: outputs usage information
-V, --version: outputs the version number
-l, --lang: outputs the language of the text in the image
-p, --print: prints out the text in the image (instead of copying to clipboard)
As of this writing, Tesseract supports 65 languages with more on the way. The code you append to the --lang tag should be whatever code is used in those Tesseract files.
For example, -l eng will search the image for English text, while -l jpn will search for Japanese text and you can even run -l jpn_vert to search for vertically-oriented Japanese text.
Since imgclip relies heavily on Tesseract, you basically have the power of that entire library at your disposal.
To get started, visit the GitHub page and download a copy locally, or install it to a specific directory via npm. Then, you can run the tool in the terminal like an application to parse any image you want.
To see imgclip in action, check out this brief video created as an imgclip demo.