Skip to content

Instantly share code, notes, and snippets.

View shoaib281's full-sized avatar

Shoaib shoaib281

  • London, England
View GitHub Profile
@QuentinN42
QuentinN42 / ocr
Created September 19, 2021 08:12
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