Skip to content

Commit

Permalink
Merge pull request #4150 from tfmorris/4149-directory-to-stdout
Browse files Browse the repository at this point in the history
Send output of combine_tessdata -d to stdout instead of stderr. Fixes #4149
  • Loading branch information
zdenop committed Oct 24, 2023
2 parents dc228ed + 0717470 commit eb612f0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ccutil/tessdatamanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,11 +211,11 @@ void TessdataManager::Clear() {

// Prints a directory of contents.
void TessdataManager::Directory() const {
tprintf("Version:%s\n", VersionString().c_str());
printf("Version:%s\n", VersionString().c_str());
auto offset = TESSDATA_NUM_ENTRIES * sizeof(int64_t);
for (unsigned i = 0; i < TESSDATA_NUM_ENTRIES; ++i) {
if (!entries_[i].empty()) {
tprintf("%u:%s:size=%zu, offset=%zu\n", i, kTessdataFileSuffixes[i], entries_[i].size(),
printf("%u:%s:size=%zu, offset=%zu\n", i, kTessdataFileSuffixes[i], entries_[i].size(),
offset);
offset += entries_[i].size();
}
Expand Down
3 changes: 3 additions & 0 deletions src/training/combine_tessdata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,9 @@ int main(int argc, char **argv) {
"Usage for listing directory of components:\n"
" %s -d traineddata_file\n\n",
argv[0]);
printf(
"NOTE: Above two flags may combined as -dl or -ld to get both outputs"
);
printf(
"Usage for compacting LSTM component to int:\n"
" %s -c traineddata_file\n",
Expand Down

0 comments on commit eb612f0

Please sign in to comment.