TextShot takes a screenshot and copies its text content to the clipboard for Windows, macOS and most modern Linux distributions.

use

textshot -h Print available command line options:

usage: textshot [-h] [-i INTERVAL] [langs]

Take a screenshot and copy its text content to the clipboard.

positional arguments:
langs                 languages passed to tesseract, eg. "eng+fra" (default: eng)

optional arguments:
-h, --help            show this help message and exit
-i INTERVAL, --interval INTERVAL
                        select a screen region then take textshots every INTERVAL milliseconds

example

  • Basic usage:textshotOpens an overlay where you can draw a rectangle around the text you want to copy.

  • Alternate language:textshot eng+fraSpecifies to use English as the primary language and French as the secondary language. Make sure to install the appropriate data files for Tesseract for other languages.available hereFind a list of all supported languages.

  • Continuously copy text content:textshot --interval 200Draws a rectangle in the screen area, and copies text from it every 200 milliseconds.

hotkey

It is recommended to attach a global hotkey to this tool so you can run it without opening a console and typing commands.

existon windows,can useAutoHotkeyscript to do this;textshot.ahkContains a sample AHK script that you can use.

existon Ubuntu, open the keyboard settings and it will show you all the Gnome shortcuts.at the bottom there is a+button to add your own shortcuts.Click on it and set the command totextshot. If you are using a virtual environment,textshotThe above path should point to the environment’stextshot.

You can find the process on other operating systems by searching for how to run a shell command with a keyboard shortcut.

troubleshooting

Apple system

You may need to grant permission to capture your screen. You can go to System Preferences > Security & Privacy > Privacy > Screen Recording and check the box for Terminal/iTerm.

Linux

If the text is displayed correctly in the notification, but you can’t paste it, installxclip(e.g. usingsudo apt install xclip)

#TextShot #Homepage #Documentation #Download #Screenshot #Text #Recognition #Tool #News Fast Delivery

Leave a Comment

Your email address will not be published. Required fields are marked *