Skip to content

Instantly share code, notes, and snippets.

@tnaia
Forked from QuentinN42/ocr
Created March 25, 2022 15:17
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save tnaia/23b85c5746b6d484da67483059800f99 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment