diff options
Diffstat (limited to 'public/.local')
| -rwxr-xr-x | public/.local/bin/screenshot_ocr.sh | 5 |
1 files changed, 4 insertions, 1 deletions
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 (<C-;>) +xclip -selection clipboard -t image/png -i $filename rm $filename # TODO: clean japanese output. If text is 80% japanese characters, then it |
