Skip to content
/ gocr Public

Lightweight OCR app in Go to extract text from images in GUI using Tesseract.

Notifications You must be signed in to change notification settings

Wraient/gocr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GOCR

Gocr is a simple yet effective Optical Character Recognition (OCR) application built in Go. With GOCR, you can select an image file, extract text from it, and interact with the extracted text. The app lets you click on text boxes to copy specific pieces or view all the extracted text below the image. While not 100% accurate, it provides a user-friendly OCR experience.

Demo

image

Features

  • Open an image file for OCR scanning.
  • Extract text using Tesseract OCR.
  • Click on specific text boxes to copy text to the clipboard.
  • View all extracted text in a scrollable section below the image.
  • Requires Tesseract OCR engine for operation.

Requirements

  1. Tesseract OCR
  2. Gocr binary: Download the latest release from Gocr Releases.

Installing and Setup

Note: Gocr requires Tesseract to work. Installation instructions for Tesseract on various Linux distributions are included below.

Linux

Arch Linux / Manjaro (AUR-based systems)
sudo pacman -S tesseract tesseract-data-eng
curl -Lo gocr https://github.com/Wraient/gocr/releases/latest/download/gocr
chmod +x gocr
sudo mv gocr /usr/bin/
Debian / Ubuntu (and derivatives)
sudo apt update
sudo apt install tesseract-ocr
curl -Lo gocr https://github.com/Wraient/gocr/releases/latest/download/gocr
chmod +x gocr
sudo mv gocr /usr/bin/
Fedora Installation
sudo dnf update
sudo dnf install tesseract
curl -Lo gocr https://github.com/Wraient/gocr/releases/latest/download/gocr
chmod +x gocr
sudo mv gocr /usr/bin/
openSUSE Installation
sudo zypper refresh
sudo zypper install tesseract
curl -Lo gocr https://github.com/Wraient/gocr/releases/latest/download/gocr
chmod +x gocr
sudo mv gocr /usr/bin/
Generic Linux Installation
sudo <package-manager> install tesseract
curl -Lo gocr https://github.com/Wraient/gocr/releases/latest/download/gocr
chmod +x gocr
sudo mv gocr /usr/bin/

Usage

Options

Flag Description
-i [Image path] Returns extracted text from image in terminal
-g [Image path] Opens gui with specified image

Uninstallation

To remove Gocr:

sudo rm /usr/bin/gocr