tesseract-ocr / tesseract

Tesseract Open Source OCR Engine (main repository)

Home Page:https://tesseract-ocr.github.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add redirect function

xiaoxstz opened this issue · comments

Your Feature Request

Many command supports redirect usage, for example

echo "HelloWorld" > 1.txt
echo "HelloWorld" | clip

If tesseract supports it, it will be more user-friendly.

I write a script to snapshot and then recognize it (for Windows).

ksnip.exe -c -p "d:\temp\source.png" &&
tesseract.exe "d:\temp\source.png" "d:\temp\ocr_result" -l eng &&
cat "d:\temp\ocr_result.txt" | clip

It will be more simple a lot if tesseract supports redirecting function like many commands, such as cat. If it supports, the script will be

ksnip.exe -c -p "d:\temp\source.png" &&
tesseract.exe "d:\temp\source.png" -l eng | clip

Redirecting function give users freedom to save result to anywhere