{"id":13412037,"url":"https://github.com/ianzhao05/textshot","last_synced_at":"2025-05-14T00:07:08.816Z","repository":{"id":36978090,"uuid":"265975639","full_name":"ianzhao05/textshot","owner":"ianzhao05","description":"Python tool for grabbing text via screenshot","archived":false,"fork":false,"pushed_at":"2024-12-20T02:40:21.000Z","size":66,"stargazers_count":1757,"open_issues_count":8,"forks_count":260,"subscribers_count":44,"default_branch":"master","last_synced_at":"2025-04-05T17:00:25.588Z","etag":null,"topics":["ocr","ocr-recognition","python","python-3","python-script","python3","screenshot","script","tesseract","tesseract-ocr"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ianzhao05.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-05-21T23:46:51.000Z","updated_at":"2025-04-05T07:09:30.000Z","dependencies_parsed_at":"2025-01-17T12:00:31.230Z","dependency_job_id":"42979e94-caa2-4301-87cc-d4e176fb9248","html_url":"https://github.com/ianzhao05/textshot","commit_stats":{"total_commits":89,"total_committers":12,"mean_commits":7.416666666666667,"dds":0.3932584269662921,"last_synced_commit":"e0d003f84f3cb2a632682c49f119f6648e769bd3"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ianzhao05%2Ftextshot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ianzhao05%2Ftextshot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ianzhao05%2Ftextshot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ianzhao05%2Ftextshot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ianzhao05","download_url":"https://codeload.github.com/ianzhao05/textshot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248615847,"owners_count":21133959,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ocr","ocr-recognition","python","python-3","python-script","python3","screenshot","script","tesseract","tesseract-ocr"],"created_at":"2024-07-30T20:01:20.367Z","updated_at":"2025-04-12T18:37:55.171Z","avatar_url":"https://github.com/ianzhao05.png","language":"Python","funding_links":[],"categories":["Python","Python (1887)","HarmonyOS"],"sub_categories":["Windows Manager"],"readme":"\u003ch1 align=\"center\"\u003eTextShot\u003c/h1\u003e\n\n\u003cdiv align=\"center\"\u003e\n\u003ca href=\"https://github.com/ianzhao05/textshot/stargazers\"\u003e\u003cimg alt=\"GitHub stars\" src=\"https://img.shields.io/github/stars/ianzhao05/textshot\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/ianzhao05/textshot/network\"\u003e\u003cimg alt=\"GitHub forks\" src=\"https://img.shields.io/github/forks/ianzhao05/textshot\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/ianzhao05/textshot/blob/master/LICENSE.txt\"\u003e\u003cimg alt=\"GitHub license\" src=\"https://img.shields.io/github/license/ianzhao05/textshot\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/psf/black\"\u003e\u003cimg alt=\"Code style: black\" src=\"https://img.shields.io/badge/code%20style-black-000000.svg\"\u003e\u003c/a\u003e\n\u003c/div\u003e\n\nTake a screenshot and copy its text content to the clipboard. Works on Windows, macOS, and most modern Linux distros.\n\n![TextShot Demo](https://i.imgur.com/Z0Ng13S.gif)\n\n## Use\n\n`textshot -h` prints the available command line options:\n\n    usage: textshot [-h] [-i INTERVAL] [langs]\n\n    Take a screenshot and copy its text content to the clipboard.\n\n    positional arguments:\n    langs                 languages passed to tesseract, eg. \"eng+fra\" (default: eng)\n\n    optional arguments:\n    -h, --help            show this help message and exit\n    -i INTERVAL, --interval INTERVAL\n                            select a screen region then take textshots every INTERVAL milliseconds\n\n### Examples\n\n- Basic usage: `textshot` opens an overlay where a rectangle can be drawn around the text to be copied.\n\n- Alternate languages: `textshot eng+fra` specifies use of English as the primary language and French as the secondary language. Make sure that the appropriate data files for Tesseract are installed for other languages. A list of all supported languages can be found [here](https://github.com/tesseract-ocr/tesseract/blob/master/doc/tesseract.1.asc#languages-and-scripts).\n\n- Continuously copy text content: `textshot --interval 200` draw a rectangle at a screen region then copy text from it every 200ms.\n\n### Hotkeys\n\nIt is recommended to attach a global hotkey to this tool, so you can run it without opening a console and typing in the command.\n\nOn **Windows**, one can accomplish this by using an [AutoHotkey](https://www.autohotkey.com/) script; `textshot.ahk` contains a sample AHK script that can be used.\n\nOn **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 `textshot`. In case you are using a virtual environment, the `textshot` path above should point to the environment's `textshot`.\n\nThe process on other operating systems can be found by searching how to run a shell command with a keyboard shortcut.\n\n## Installation\n\n### Prerequisites\n\n- Install [Google's Tesseract OCR Engine](https://github.com/tesseract-ocr/tesseract), and ensure that `tesseract` can be reached from the command line by adding the directory to your system path.\n\n### Installation with `pip`\n\n    $ pip install textshot\n    $ textshot\n\nYou may wish to use a virtual environment if the dependencies conflict with others on your machine.\n\n### Installation from source\n\n- Clone this repository... `git clone https://github.com/ianzhao05/textshot.git`\n- ...and `cd` into it: `cd textshot`\n- Run `pip install .` (for development, you may install with `pip install -e .` which will allow you to test your modifications without reinstall)\n- You may now run `textshot`\n\n### From repository\n\n@rigred has added this to the AUR, so Arch Linux users can install the package `textshot-git` with their AUR helper. For example, `yay -S textshot-git`. This may not be up to date, so if you encounter issues, use the normal installation method above.\n\n## Troubleshooting\n\n### macOS\n\nYou may need to give permission to capture the screen. You can do so by going to System Preferences \u003e Security \u0026 Privacy \u003e Privacy \u003e Screen Recording, then checking the box for Terminal/iTerm.\n\n### Linux\n\nIf the text shows up correctly in the notification, but you cannot paste it, install `xclip` (e.g. with `sudo apt install xclip`).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fianzhao05%2Ftextshot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fianzhao05%2Ftextshot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fianzhao05%2Ftextshot/lists"}