Skip to content

Instantly share code, notes, and snippets.

@QuentinN42
Created September 19, 2021 08:12
Show Gist options
  • Save QuentinN42/53396a9cfc341e780da0d123a7e753b7 to your computer and use it in GitHub Desktop.
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
@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