Skip to content

Kvndoshi/snip-ocr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

snip-ocr

A lightweight utility to snip any region of your screen, extract its text using OCR, and copy it directly to your clipboard.

Why this

  • Built on PyTesseract (Tesseract OCR) for enhanced text extraction quality
  • In practice, its accuracy is often better than the built‑in Snipping OCR available via Microsoft PowerToys

Requirements

  • Python 3.9+ (Windows)
  • System dependency:
    • Tesseract OCR installed on Windows (e.g., C:\Program Files\Tesseract-OCR)
  • Python packages:
    • pyautogui
    • pytesseract
    • pillow
    • pyperclip
    • tkinter (bundled with standard Python on Windows)

Install packages:

pip install pyautogui pytesseract pillow pyperclip

If Tesseract is not on PATH, set in code (already present in main.py):

pytesseract.pytesseract.tesseract_cmd = r'C:\\Program Files\\Tesseract-OCR\\tesseract'

Usage

python main.py
  • A small window appears with two buttons: green to start snipping, red to close.
  • Click green, select a region; extracted text is copied to the clipboard and the window reappears with a status message.

Build an EXE (optional)

Use PyInstaller to create a standalone executable for local use:

pip install pyinstaller
pyinstaller --onefile --windowed main.py

Your executable will be in the dist/ folder.

Screenshots

Screenshot

After running the code, it gives you the option to start the snip.

Screenshot

This is what the snip interface looks like.

License

Apache License 2.0. See LICENSE.

Keywords

snip-ocr, screen ocr, screenshot to text, tesseract, pytesseract, pyautogui, clipboard, text extraction, windows ocr, tkinter ocr, snipping tool alternative, copy text from screen, OCR utility, python ocr, offline ocr

About

Snip any region of your screen, OCR it with Tesseract, and copy text to clipboard. Lightweight Tkinter utility; buildable to a Windows EXE.

Topics

Resources

License

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages