Show HN: OCR-grab: Flameshot clone that adds OCR

tgol1 pts0 comments

GitHub - talalalrwas/ocr-grab: Flameshot clone that adds OCR. · GitHub

/" data-turbo-transient="true" />

Skip to content

Search or jump to...

Search code, repositories, users, issues, pull requests...

-->

Search

Clear

Search syntax tips

Provide feedback

--><br>We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Cancel

Submit feedback

Saved searches

Use saved searches to filter your results more quickly

-->

Name

Query

To see all available qualifiers, see our documentation.

Cancel

Create saved search

Sign in

/;ref_cta:Sign up;ref_loc:header logged out"}"<br>Sign up

Appearance settings

Resetting focus

You signed in with another tab or window. Reload to refresh your session.<br>You signed out in another tab or window. Reload to refresh your session.<br>You switched accounts on another tab or window. Reload to refresh your session.

Dismiss alert

{{ message }}

talalalrwas

ocr-grab

Public

Notifications<br>You must be signed in to change notification settings

Fork

Star

main

BranchesTags

Go to file

CodeOpen more actions menu

Folders and files<br>NameNameLast commit message<br>Last commit date<br>Latest commit

History<br>6 Commits<br>6 Commits

src

src

.gitignore

.gitignore

LICENSE

LICENSE

Makefile

Makefile

README.md

README.md

ocr-grab_demo.gif

ocr-grab_demo.gif

View all files

Repository files navigation

OCR Grab

A lightweight, blazing fast X11 screenshot utility built in C with GTK3 and Tesseract. OCR Grab allows you to interactively select a region of your screen, just like Flameshot, and instantly extracts text from that region straight to your clipboard.

Demo

Features

Interactive Region Selection : Click and drag to define your selection.

Adjustment Mode : Precisely resize and reposition the capture rectangle after your initial drag.

Dynamic Cursors : Context-aware mouse cursors for edge resizing, dragging, and selecting.

Instant OCR : Uses the powerful Tesseract engine (via the C API) to convert images to text in milliseconds.

Clipboard Integration : Automatically copies the result to your system clipboard. Contains a fallback mechanism for bare-bones Window Managers (like i3 or dwm) utilizing xclip.

Dependencies

You'll need a C compiler (gcc), make, and the development headers for the following libraries:

gtk+-3.0

tesseract

leptonica

zbar

x11

Ubuntu / Debian:

sudo apt update<br>sudo apt install build-essential pkg-config libgtk-3-dev libtesseract-dev libleptonica-dev libzbar-dev libx11-dev xclip tesseract-ocr-eng

(Note: tesseract-ocr-eng provides the english language training data).

Building

Clone the repository and run make:

git clone https://github.com/talalalrwas/ocr-grab.git<br>cd ocr-grab<br>make

This will produce the ocr-grab executable in the project root.

Usage

Run the tool from your terminal or bind it to a hotkey in your window manager (e.g. Mod+Print in i3).

./ocr-grab

Draw : Click and drag to draw a box around the text.

Adjust : Drag the corners or edges to refine the selection, or click inside to move the entire box.

Confirm : Press Enter to finalize the selection and extract text.

Cancel : Press Escape to discard the current selection or exit the tool entirely.

When the text is successfully extracted, it will be displayed in a popup window. Clicking "Copy & Close" will save the result to your primary and selection clipboards.

License

This project is licensed under the GNU General Public License v3.0 (GPL-3.0). See the LICENSE file for details.

About

Flameshot clone that adds OCR.

Topics

ocr

x11

gtk3

screenshot-utility

Resources

Readme

License

GPL-3.0 license

Uh oh!

There was an error while loading. Please reload this page.

Activity

Stars

star

Watchers

watching

Forks

forks

Report repository

Releases

No releases published

Packages

Uh oh!

There was an error while loading. Please reload this page.

Contributors

Uh oh!

There was an error while loading. Please reload this page.

Languages

98.3%

Makefile<br>1.7%

You can’t perform that action at this time.

grab license window reload selection clone

Related Articles