https://github.com/dmzlingyin/LOCR
A lightweight but powerful OCR tool.
https://github.com/dmzlingyin/LOCR
cli command-line go golang-tools ocr
Last synced: about 4 hours ago
JSON representation
A lightweight but powerful OCR tool.
- Host: GitHub
- URL: https://github.com/dmzlingyin/LOCR
- Owner: dmzlingyin
- License: mit
- Created: 2022-05-01T05:37:32.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-11-01T03:36:39.000Z (over 3 years ago)
- Last Synced: 2026-04-19T15:35:03.941Z (3 months ago)
- Topics: cli, command-line, go, golang-tools, ocr
- Language: Go
- Homepage:
- Size: 51.1 MB
- Stars: 11
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-computer-use - LOCR - Lightweight auto-extract OCR, cross-platform Go. `100 ⭐`. (OCR and Screen Reading)
README
# Introduction
English | [简体中文](README_zh-CN.md)
LOCR(Lightweight OCR) is a tool that can detect the image and extract the text automatically when the clipboard changed.
# Features
* Cross platform supports: macOS, Linux (X11), and Windows.
* Chinese and English support(feel free to add your language).
# Dependency
* go 1.16+
* OCR server(not nesessary for offline version):
- [PaddleOCR](https://github.com/PaddlePaddle/PaddleOCR)(Recommend)
- [tesseract](https://github.com/tesseract-ocr/tesseract)
- [EasyOCR](https://github.com/JaidedAI/EasyOCR)
- [ocrserver](https://github.com/otiai10/ocrserver)
# Installation
```go
git clone https://github.com/dmzlingyin/LOCR.git
cd LOCR
go build
./install.sh
```
then you can type locr on you terminal to use it.
# Examples
If you use locr normaly, just run it. If you just want to extract text from an image, see follow:
```shell
cat xxx.jpg | locr -f
# save to file
cat xxx.jpg | locr -f > text.txt
```
# TODO
- [x] hotkey
- [ ] offline version