diff options
| author | Maciej Sobkowski <maciej@sobkow.ski> | 2025-11-03 15:29:32 +0100 |
|---|---|---|
| committer | Maciej Sobkowski <maciej@sobkow.ski> | 2025-11-03 15:29:32 +0100 |
| commit | 0fe0fe4c6b7af81708b9a8eb0278e7a190b78e41 (patch) | |
| tree | 1cebf67baf4dec72bc00e0cf8e513d7aa8a7ee91 /.local/bin/transcribe.sh | |
| parent | fb7d10becb9c040bde3a61a44731f3d79ed25272 (diff) | |
.local/bin/transcribe.sh: add script for OCR on screenshots
Diffstat (limited to '.local/bin/transcribe.sh')
| -rwxr-xr-x | .local/bin/transcribe.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/.local/bin/transcribe.sh b/.local/bin/transcribe.sh new file mode 100755 index 0000000..da3fc85 --- /dev/null +++ b/.local/bin/transcribe.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +tmp=`mktemp --suffix ".png"` + +grim -g "$(slurp -d)" "$tmp" +if [ "$?" == "0" ] +then + tesseract -l pol+eng $tmp - | wl-copy -n + notify-send "screentool" "Area transcribed!" +fi +rm $tmp |
