A lightweight but powerful OCR tool.

fx preview

这个项目是什么?

LOCR(Lightweight OCR)是一款轻量级的文字识别工具, 结合第三方截图工具, 可以快速的对图片文字进行识别。

为什么有这个项目

在日常学习的工作中, 难免会遇到一些文字的复制粘贴任务。但由于一些限制,我们无法复制想要的文字,只能一个字一个字的敲出来。而随着近几年OCR技术的成熟,越来越多的网站和工具开始支持图片的文字识别功能,可以快速的提取出我们想要的文字。 但就我个人而言,目前的OCR工具存在着诸多的弊端:

  1. 免费使用次数有限
  2. 对于网站类识别, 操作过于繁琐(先截图, 再保存, 再打开网站, 再将图片拖到浏览器, 再选中识别出来的文字, 最后粘贴)
  3. 对于客户端类识别, 软件功能过于复杂(当然, 仅仅是个人观点), 而且很少支持跨平台(个人电脑为Arch)

本项目的目标

本项目预期实现一个轻量但强大的命令行OCR工具, 简单快速地(选中识别区域->复制到剪贴板->粘贴到你想要的任何地方)(需结合第三方截图软件, e.g. Windows: Snipaste, Linux: Flameshot)实现图片文字提取及识别。

依赖

  1. go1.16+
  2. OCR服务器(离线版本不需要), 多种OCR实现可选:
    1. PaddleOCR(推荐)
    2. tesseract
    3. EasyOCR
    4. ocrserver

使用

git clone https://github.com/dmzlingyin/LOCR.git
cd LOCR
go mod tidy
go build
./locr

待实现的功能

  • 识别剪贴板的图片, 将识别结果自动存入剪贴板
  • 绑定热键, 控制是否自动识别
  • 可以将识别结果转储到文件
  • 结合Unix管道符实现图片的读入与识别
  • 支持离线识别
Owner
lingyin
代码必须能够被人阅读,只是机器恰好可以执行。用毕生时间谱写GO/C++/Python篇章
lingyin
Similar Resources

Lightweight CLI tool to programmatically rescale your Hetzner virtual server daily to optimize your budget spending

Lightweight CLI tool to programmatically rescale your Hetzner virtual server daily to optimize your budget spending

Nov 28, 2022

Query, update and convert data structures from the command line. Comparable to jq/yq but supports JSON, TOML, YAML, XML and CSV with zero runtime dependencies.

Query, update and convert data structures from the command line. Comparable to jq/yq but supports JSON, TOML, YAML, XML and CSV with zero runtime dependencies.

dasel Dasel (short for data-selector) allows you to query and modify data structures using selector strings. Comparable to jq / yq, but supports JSON,

Jan 2, 2023

lsp is like ls command but more human-friendly

lsp is like ls command but more human-friendly

lsp: list files in a mildly human-frendlier manner lsp lists files, like ls command, but it does not attempt to meet that archaic POSIX specification,

Dec 12, 2022

🎭👄 Like cowsay but it's random anime quote

🎭👄 Like cowsay but it's random anime quote

🎭 👄 weebsay - cowsay but it's random anime quote 🌸 aesthetics inspired by TorchedSammy follow him he is a good guy Installation 🔨 go get -u github

Dec 11, 2022

car is like tar, but for containers!

Mainly, car lets you list or extract files from an OCI (possibly Docker) image, regardless of the platform it was built for. For example, you can extract files from a windows/amd64 image even if you are running linux/arm64.

Nov 26, 2022

😎 Yet Another yes clone but in Golang

Yeah Output a string repeatedly until killed. Yet Another yes clone but in Golang. Usage Just like yes: yeah This will print "y" until the process is

Apr 7, 2022

Go-Suit is a very very wacky version of a bash terminal but in go, however with a little twitst

Go-Suit Go-Suit is a very very wacky version of a bash terminal but in go, however with a little twitst languages - Go-Lang packages Third Party - g

May 19, 2022

I like reading news but I also like the terminal. I am leaning and practicing my go.

I like reading news but I also like the terminal. I am leaning and practicing my go.

I made an api and didn't know how to use it. Screenshots The initial screen when you first run the app. The screen after you specify an id. This app u

Jan 14, 2022

Go-dura - Tim Kellogg's Dura but written in Go

go-dura Tim Kellogg's Dura but written in Go I encourage anyone with Rust knowle

May 9, 2022
Flag is a simple but powerful command line option parsing library for Go support infinite level subcommand

Flag Flag is a simple but powerful commandline flag parsing library for Go. Documentation Documentation can be found at Godoc Supported features bool

Sep 26, 2022
`tmax` is a powerful tool to help you get terminal cmd directly.
`tmax`  is a powerful tool to help you get terminal cmd directly.

The positioning of tmax is a command line tool with a little artificial intelligence. If you frequently deal with the terminal daily, tmax will greatly improve your work efficiency.

Oct 15, 2022
A powerful cli tool to implement gin annotation ⭐
A powerful cli tool to implement gin annotation ⭐

gin-annotation A powerful cli tool to implement gin annotation Chinese Document Features Using code generating technology by operating golang AST Rout

Mar 24, 2022
A fast and powerful alternative to grep

sift A fast and powerful open source alternative to grep. Features sift has a slightly different focus than most other grep alternatives. Code search,

Jan 3, 2023
Building powerful interactive prompts in Go, inspired by python-prompt-toolkit.
Building powerful interactive prompts in Go, inspired by python-prompt-toolkit.

go-prompt A library for building powerful interactive prompts inspired by python-prompt-toolkit, making it easier to build cross-platform command line

Jan 3, 2023
A powerful little TUI framework 🏗
A powerful little TUI framework 🏗

Bubble Tea The fun, functional and stateful way to build terminal apps. A Go framework based on The Elm Architecture. Bubble Tea is well-suited for si

Dec 27, 2022
Powerful CLI written in GO to generate projects in various technologies
Powerful CLI written in GO to generate projects in various technologies

Barca CLI is a project generator written in GO and its purpose is to build and configure HTTP servers, web proxy, SPA/PWA, Blog and custom landing page. It's easy, fast and productive.

Aug 26, 2022
A powerful modern CLI and SHELL
A powerful modern CLI and SHELL

Grumble - A powerful modern CLI and SHELL There are a handful of powerful go CLI libraries available (spf13/cobra, urfave/cli). However sometimes an i

Dec 30, 2021
Mcli - A mininal and very powerful cli library for Go

mcli mcli is a minimal but powerful cli library for Go. m stands for minimal and

Nov 18, 2022
🚀 Platform providing a powerful and fast public script parsing API dedicated to the Skript community.

SkriptMC-Parser is currently a prototype in the early stages of development of a system that allows the Skript community to test their scripts via a public API for potential errors or warnings. This is a quick and easy way to check your scripts without having to set up a Spigot server on your environment.

Mar 3, 2022