Git Product home page Git Product logo

textshot's Introduction

TextShot

This tool gives users the ability to take a screenshot and copy to the clipboard the text content of the screenshot.

TextShot Demo

Use

Running textshot.py will open an overlay over the screen, where a rectangle can be drawn over the portion of the screen containing the text the user wishes to copy.

An optional command line argument can specify the language. For example, python textshot.py eng+fra will use English as the primary language and French as the secondary language. The default is eng (English). Make sure that the appropriate data files for Tesseract are installed for other languages.

It is recommended to attach a global hotkey to this tool.

On Windows, one can accomplish this by using an AutoHotkey script; textshot.ahk contains a sample AHK script that can be used.
On Ubuntu, open the Keyboard Settings, which shows you all the Gnome shortcuts. At the bottom there is a + button to add your own shortcuts. Click it and set the command to /usr/bin/python3 <path-to-textshot.py>. In case you are using a venv, the python3 path above should point to the venv's python3 instead of the global python3.

Installation

  • Install Python 3
  • Clone this repository, and cd into it
  • (Optional) Create a virtual environment, for example with python -m venv .venv
  • Install the required packages with pip install -r requirements.txt
  • Install Google's Tesseract OCR Engine, and ensure that tesseract can be reached from the command line by adding the directory to your system path.

textshot's People

Contributors

0xflotus avatar 1ace avatar alinuxperson avatar br3w0r avatar ianzhao05 avatar krithikvaidya avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.