completely ripping off fufexan in hopes of fixing things

This commit is contained in:
cnst
2024-07-30 21:41:28 +02:00
parent d0cf745c41
commit 7e6787ff38
17 changed files with 549 additions and 249 deletions

View File

@@ -0,0 +1,17 @@
{
writeShellScriptBin,
lib,
grim,
libnotify,
slurp,
tesseract5,
wl-clipboard,
langs ? "eng+hun+fra+jpn+jpn_vert+kor+kor_vert+pol+ron+spa",
}: let
_ = lib.getExe;
in
writeShellScriptBin "wl-ocr" ''
${_ grim} -g "$(${_ slurp})" -t ppm - | ${_ tesseract5} -l ${langs} - - | ${wl-clipboard}/bin/wl-copy
echo "$(${wl-clipboard}/bin/wl-paste)"
${_ libnotify} -- "$(${wl-clipboard}/bin/wl-paste)"
''