tesseract  5.0.0-alpha-619-ge9db
set_unicharset_properties.cpp File Reference
#include "commandlineflags.h"
#include "commontraining.h"
#include "tprintf.h"
#include "unicharset_training_utils.h"

Go to the source code of this file.

Functions

int main (int argc, char **argv)
 

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 24 of file set_unicharset_properties.cpp.

24  {
25  tesseract::CheckSharedLibraryVersion();
26  tesseract::ParseCommandLineFlags(argv[0], &argc, &argv, true);
27 
28  // Check validity of input flags.
29  if (FLAGS_U.empty() || FLAGS_O.empty()) {
30  tprintf("Specify both input and output unicharsets!\n");
31  exit(1);
32  }
33  if (FLAGS_script_dir.empty()) {
34  tprintf("Must specify a script_dir!\n");
35  exit(1);
36  }
37 
38  tesseract::SetPropertiesForInputFile(FLAGS_script_dir.c_str(),
39  FLAGS_U.c_str(), FLAGS_O.c_str(),
40  FLAGS_X.c_str());
41  return 0;
42 }
tesseract::ParseCommandLineFlags
void ParseCommandLineFlags(const char *usage, int *argc, char ***argv, const bool remove_flags)
Definition: commandlineflags.cpp:166
tprintf
DLLSYM void tprintf(const char *format,...)
Definition: tprintf.cpp:34
tesseract::SetPropertiesForInputFile
void SetPropertiesForInputFile(const std::string &script_dir, const std::string &input_unicharset_file, const std::string &output_unicharset_file, const std::string &output_xheights_file)
Definition: unicharset_training_utils.cpp:183