From d5b99dc02058be18fc53a1eb6de2e022197334d6 Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Tue, 22 Nov 2022 20:01:22 +0100 Subject: [PATCH] screenshot: also add OCR --- bin/screenshot | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bin/screenshot b/bin/screenshot index 34e886f..110c6e5 100755 --- a/bin/screenshot +++ b/bin/screenshot @@ -14,4 +14,10 @@ case $1 in | xclip -selection clipboard -t image/png notify-send -i camera-photo "Screenshot" "Saved to clipboard" ;; + ocr) + maim -u -s -b 5 -l -c 0.3,0.4,0.6,0.4 -d 0.1 \ + | tesseract --dpi 96 -l eng - - \ + | xclip -selection clipboard -t text/plain + notify-send -i ebook-reader "OCR" "Saved to clipboard" + ;; esac