Copy text from interactive screenshots using Tesseract
A simple Electron-built open-source screenshot app that runs Tesseract on a macOS specific interactive screenshot.
- App lives only in the menu bar for easier use
- Every language supported by Tesseract is supported by ClipTess
- Language can be changed in the menu bar settings (Default is Japanese)
- Must have Tesseract installed on the command line for each language you intend to use ClipTess for. Must be installed through Homebrew as path to command used is
/opt/homebrew/bin/tesseract
- How to download Tesseract through Homebrew:
brew install tesseract
- Afterwards, to install all languages, run:
brew install tesseract-lang
- Not all languages are needed, but all will still be displayed in the
Change language
dropdown menu
- How to download Tesseract through Homebrew:
- macOS has the
screencapture
cli tool built-in so no need for macOS users.- That being said, this is a macOS-only app despite being built on a cross-platform framework. I just used Electron for the ease of development. I suppose I could always add in the windows equivalent screen capture tool... adding that to my to-do list.
I've spent years looking for a good, lightweight, and simple-to-use macOS version of Capture2Text to no avail. Finally, after learning a good amount of the Electron framework and web development in general, I decided to quickly give the creation of this app a go.
Other apps I've found do a great job at what I need, but the only problem is that they don't use Tesseract under the hood, causing a huge deficit in language compatibility. By using Tesseract through the command line, I've pretty much found a way to make this whole app open-source, thankfully, since I'm assuming other apps are employing their proprietary OCR software under the hood.
- Clone repository to a local folder using whichever means you prefer. I personally prefer the Github Desktop app.
- In the repository, run
yarn run tsc
everytime you want to test a change usingyarn electron .
in order for TypeScript'stsc
compiler to compile all TypeScript files to JavaScript.- (Optional) You can have Typescript's
tsc
cli command globally installed instead and just runtsc
everytime you want to compile the files.
- (Optional) You can have Typescript's
- When you are done making changes, run
yarn make
to generate your app in theout/
folder.
- Allow for a method to change the global shortcut
- Use any Tesseract path installed by user, possibly done through a submenu option or in preferences
- Add a preferences window
- Adapt
Change language
dropdown menu to user's locally installed Tesseract languages - Make compatible on Windows using its equivalent screen capture tool
- Add option to wrap lines naturally
- Imitate other ocr clipboard mac apps as close as possible but with Tesseract used instead