Fix more code style issues (reported by Codacy)

Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
Stefan Weil 2024-06-10 07:12:12 +02:00
parent cde0576fb3
commit 651f172c42
2 changed files with 29 additions and 27 deletions

View File

@ -15,9 +15,10 @@ Use the [user forum](https://groups.google.com/g/tesseract-ocr) instead of creat
* You have a general question. * You have a general question.
An issue should only be reported if the platform you are using is one of these: An issue should only be reported if the platform you are using is one of these:
* Linux (but not a version that is more than 4 years old)
* Windows (Windows 7 or newer version) * Linux (but not a version that is more than 4 years old)
* macOS (last 3 releases) * Windows (Windows 7 or newer version)
* macOS (last 3 releases)
For older versions or other operating systems, use the Tesseract forum. For older versions or other operating systems, use the Tesseract forum.
@ -40,8 +41,9 @@ Post example files to demonstrate the problem.
BUT don't post files with private info (about yourself or others). BUT don't post files with private info (about yourself or others).
When attaching a file to the issue report / forum ... When attaching a file to the issue report / forum ...
* Do not post a file larger than 20 MB.
* GitHub supports only few file name extensions like `.png` or `.txt`. If GitHub rejects your files, you can compress them using a program that can produce a zip archive and then load this zip file to GitHub. * Do not post a file larger than 20 MB.
* GitHub supports only few file name extensions like `.png` or `.txt`. If GitHub rejects your files, you can compress them using a program that can produce a zip archive and then load this zip file to GitHub.
Do not attach programs or libraries to your issues/posts. Do not attach programs or libraries to your issues/posts.

View File

@ -1,4 +1,4 @@
# autotools (LINUX/UNIX , msys...) ## autotools (LINUX/UNIX , msys...)
If you have cloned Tesseract from GitHub, you must generate If you have cloned Tesseract from GitHub, you must generate
the configure script. the configure script.
@ -10,22 +10,22 @@ You need Leptonica 1.74.2 (minimum) for Tesseract 4.0x.
Known dependencies for training tools (excluding leptonica): Known dependencies for training tools (excluding leptonica):
* compiler with c++11 support * compiler with c++11 support
* automake * automake
* pkg-config * pkg-config
* pango-devel * pango-devel
* cairo-devel * cairo-devel
* icu-devel * icu-devel
So, the steps for making Tesseract are: So, the steps for making Tesseract are:
$ ./autogen.sh ./autogen.sh
$ ./configure ./configure
$ make make
$ sudo make install sudo make install
$ sudo ldconfig sudo ldconfig
$ make training make training
$ sudo make training-install sudo make training-install
You need to install at least English language and OSD traineddata files to You need to install at least English language and OSD traineddata files to
`TESSDATA_PREFIX` directory. `TESSDATA_PREFIX` directory.
@ -36,7 +36,7 @@ All language data files can be retrieved from git repository (useful only for pa
(Repository is huge - more that 1.2 GB. You do NOT need to download traineddata files for (Repository is huge - more that 1.2 GB. You do NOT need to download traineddata files for
all languages). all languages).
$ git clone https://github.com/tesseract-ocr/tessdata.git tesseract-ocr.tessdata git clone https://github.com/tesseract-ocr/tessdata.git tesseract-ocr.tessdata
You need an Internet connection and [curl](https://curl.haxx.se/) to compile `ScrollView.jar` You need an Internet connection and [curl](https://curl.haxx.se/) to compile `ScrollView.jar`
@ -47,22 +47,22 @@ because the build will automatically download
Just run: Just run:
$ make ScrollView.jar make ScrollView.jar
and follow the instruction on [Viewer Debugging](https://tesseract-ocr.github.io/tessdoc/ViewerDebugging.html). and follow the instruction on [Viewer Debugging](https://tesseract-ocr.github.io/tessdoc/ViewerDebugging.html).
# CMAKE ## cmake
There is alternative build system based on multiplatform [cmake](https://cmake.org/) There is alternative build system based on multiplatform [cmake](https://cmake.org/)
## LINUX ### LINUX
$ mkdir build mkdir build
$ cd build && cmake .. && make cd build && cmake .. && make
$ sudo make install sudo make install
## WINDOWS ### WINDOWS
See the [documentation](https://tesseract-ocr.github.io/tessdoc/) for more information on this. See the [documentation](https://tesseract-ocr.github.io/tessdoc/) for more information on this.