This looks like a nice app. I was looking for something like this a while back until I noticed that there are "one" liners that can you can setup for a hotkey:
#!/usr/bin/env bash
langs=(eng ara fas chi_sim chi_tra deu ell fin heb hun jpn kor nld rus tur)
lang=$(printf '%s\n' "${langs[@]}" | dmenu "$@")
maim -us | tesseract --dpi 145 -l eng+${lang} - - | xsel -bi
I wonder if it's possible to auto-detect the language. Meaning, instead of the priority list, it finds out the most probable language a script belongs to in the first sweep.
Comments
This looks like a nice app. I was looking for something like this a while back until I noticed that there are "one" liners that can you can setup for a hotkey:
Nice! Didn't know about maim. This looks better than what I currently use (found it somewhere on the internet).
I mean don't scrot and maim do the same? It can write to stdout as well. Is the resize really worth it?
Tesseract get's significanlty better results after resize; can probably get away with a 2x resize on a 4k monitor, but 4x is good for e.g. 1200p
Nice, that is great! I adapted this to work for me on wayland (sway):
grim -g "$(slurp)" - | tesseract --dpi 145 -l eng+${lang} - - | wl-copy
Using grim to take a screenshot, slurp to mark a region on your screen and wl-copy to copy to clipboard.
I wonder if it's possible to auto-detect the language. Meaning, instead of the priority list, it finds out the most probable language a script belongs to in the first sweep.
yeah, i have a script almost identical to this that i've been using with i3 for a long time