this post was submitted on 18 Jun 2023
10 points (100.0% liked)

Linux

4924 readers
239 users here now

A community for everything relating to the linux operating system

Also check out [email protected]

Original icon base courtesy of [email protected] and The GIMP

founded 1 year ago
MODERATORS
10
submitted 1 year ago* (last edited 1 year ago) by [email protected] to c/[email protected]
 

I wanted to share a surprisingly elegant solution I found to copying text into the clipboard where for one reason or another it's otherwise not possible.

top 3 comments
sorted by: hot top controversial new old
[–] [email protected] 2 points 1 year ago

This is gorgeous, I've used flame shot for years, and constantly use xclip, never once thought about sticking OCR in the middle.

Awesome stuff.

[–] [email protected] 2 points 11 months ago

Thanks for this!!

I just realized I can use the following command to OCR a bitmap in the clipboard and put the text back into the clipboard.

xclip -out -selection clipboard -t image/bmp
| tesseract stdin stdout -l eng
| xclip -in -selection clipboard

This works in my linux VM (in Virtualbox on my work laptop) using bi-directional shared clipboard without touching my Windows software.

Mind blown!!

[–] [email protected] 1 points 9 months ago

Holler holler get doller. Thank you very much. Now I just need a way to use a custom image host.