Skip to content

Instantly share code, notes, and snippets.

@QuentinN42
Created September 19, 2021 08:12
  • Star 5 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save QuentinN42/53396a9cfc341e780da0d123a7e753b7 to your computer and use it in GitHub Desktop.
Automatic ocr with tesseract & flameshot
#!/usr/bin/env bash
TMPDIR=$(mktemp -d -t ocr-XXXXXXXXXX)
trap "rm -rf $TMPDIR" EXIT
cd "$TMPDIR"
flameshot gui -r > img.png
tesseract img.png text
cat text.txt | xsel --clipboard --input
@shoaib281
Copy link

thanks, this was very helpful

@dvbvr
Copy link

dvbvr commented Aug 11, 2023

I agree, great little helper :) Thanks for sharing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment