From 1163cd2e55e947874db656ce6857c929b0c32d39 Mon Sep 17 00:00:00 2001 From: Mitsuo Tokumori Date: Sat, 28 Sep 2024 15:12:19 +0900 Subject: Update screenshot_ocr.sh Now image is saved into clipboard --- public/.local/bin/screenshot_ocr.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'public') diff --git a/public/.local/bin/screenshot_ocr.sh b/public/.local/bin/screenshot_ocr.sh index d88accf..012a2b7 100755 --- a/public/.local/bin/screenshot_ocr.sh +++ b/public/.local/bin/screenshot_ocr.sh @@ -22,7 +22,10 @@ test $? -ne 0 && exit # Try to scan codes from the image zbarimg $filename | xclip -selection "clipboard" # Perform OCR and save to clipboard -tesseract $tesseract_options $filename - | xclip -selection "clipboard" +tesseract $tesseract_options $filename - | xclip -selection "clipboard" -r +# Copy image into the clipbaord (useful to pasting directly into other apps) +# To access previosly copied text use fcitx5 clip clipboard tool () +xclip -selection clipboard -t image/png -i $filename rm $filename # TODO: clean japanese output. If text is 80% japanese characters, then it -- cgit v1.2.3