From 6fae25b305d714b3ab7608fa003f1af9bf024545 Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Tue, 14 Feb 2023 13:33:23 +0800 Subject: Rename tools into bin --- tools/misc/ocr | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100755 tools/misc/ocr (limited to 'tools/misc/ocr') diff --git a/tools/misc/ocr b/tools/misc/ocr deleted file mode 100755 index 26594fe..0000000 --- a/tools/misc/ocr +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash -# Dependencies: tesseract-ocr imagemagick scrot xsel - -SCR_IMG=`mktemp` -trap "rm $SCR_IMG*" EXIT - -scrot -s $SCR_IMG.png -q 100 -# increase image quality with option -q from default 75 to 100 - -mogrify -modulate 100,0 -resize 400% $SCR_IMG.png -#should increase detection rate - -tesseract $SCR_IMG.png $SCR_IMG &> /dev/null -cat $SCR_IMG.txt | trans -t zh-TW --brief --engine bing | cat $SCR_IMG.txt - | tr '\n' ' ' | xargs -I{} notify-send --urgency=critical translation '{}' - -exit -- cgit v1.2.3-70-g09d2