A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/tesseract-ocr/tesseract/issues/4149 below:

combine_tessdata -d outputs to stderr instead of stdout · Issue #4149 · tesseract-ocr/tesseract · GitHub

Current Behavior

The directory listing from combine_tessdata -d is sent to stderr while the network listing from combine_tessdata -l gets sent to stdout.

https://github.com/tesseract-ocr/tesseract/blob/main/src/ccutil/tessdatamanager.cpp#L214-L218

Expected Behavior

I think it would be preferable to also have the output for -d to go to stdout, but I'm not sure if there are any compatibility concerns to worry about for TessdataManager::Directory()

As a workaround (courtesy of StackOverflow), one can redirect stderr as follows to get e.g. the version string in the first line:

$ combine_tessdata -d kan.traineddata 2>&1 >/dev/null | head -n 1
Version:4.00.00alpha:kan:synth20170629:[1,36,0,1Ct3,3,16Mp3,3Lfys64Lfx96Lrx96Lfx384O1c1]
Suggested Fix

Have combine_tessdata -d send its output to stdout

tesseract -v

Current HEAD commit 51cf430

Operating System

macOS 11 Big Sur

Other Operating System

No response

uname -a

No response

Compiler

No response

CPU

No response

Virtualization / Containers

No response

Other Information

No response


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4