mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2025-01-18 14:41:36 +08:00
replace option -o with -c
git-svn-id: https://tesseract-ocr.googlecode.com/svn/trunk@841 d0cd1f9f-072b-0410-8dd7-cf729c803f20
This commit is contained in:
parent
16e80c06ee
commit
62b2e12b72
@ -90,7 +90,7 @@ int main(int argc, char **argv) {
|
|||||||
} else if (strcmp(argv[arg], "--print-parameters") == 0) {
|
} else if (strcmp(argv[arg], "--print-parameters") == 0) {
|
||||||
noocr = true;
|
noocr = true;
|
||||||
print_parameters = true;
|
print_parameters = true;
|
||||||
} else if (strcmp(argv[arg], "-o") == 0 && arg + 1 < argc) {
|
} else if (strcmp(argv[arg], "-c") == 0 && arg + 1 < argc) {
|
||||||
// handled properly after api init
|
// handled properly after api init
|
||||||
++arg;
|
++arg;
|
||||||
} else if (image == NULL) {
|
} else if (image == NULL) {
|
||||||
@ -108,7 +108,7 @@ int main(int argc, char **argv) {
|
|||||||
|
|
||||||
if (output == NULL && noocr == false) {
|
if (output == NULL && noocr == false) {
|
||||||
fprintf(stderr, _("Usage:%s imagename outputbase|stdout [-l lang] "
|
fprintf(stderr, _("Usage:%s imagename outputbase|stdout [-l lang] "
|
||||||
"[-psm pagesegmode] [-o configvar=value] "
|
"[-psm pagesegmode] [-c configvar=value] "
|
||||||
"[configfile...]\n\n"), argv[0]);
|
"[configfile...]\n\n"), argv[0]);
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
_("pagesegmode values are:\n"
|
_("pagesegmode values are:\n"
|
||||||
@ -123,8 +123,8 @@ int main(int argc, char **argv) {
|
|||||||
"8 = Treat the image as a single word.\n"
|
"8 = Treat the image as a single word.\n"
|
||||||
"9 = Treat the image as a single word in a circle.\n"
|
"9 = Treat the image as a single word in a circle.\n"
|
||||||
"10 = Treat the image as a single character.\n"));
|
"10 = Treat the image as a single character.\n"));
|
||||||
fprintf(stderr, _("multiple -o arguments are allowed.\n"));
|
fprintf(stderr, _("multiple -c arguments are allowed.\n"));
|
||||||
fprintf(stderr, _("-l lang, -psm pagesegmode and any -o options must occur"
|
fprintf(stderr, _("-l lang, -psm pagesegmode and any -c options must occur"
|
||||||
"before any configfile.\n\n"));
|
"before any configfile.\n\n"));
|
||||||
fprintf(stderr, _("Single options:\n"));
|
fprintf(stderr, _("Single options:\n"));
|
||||||
fprintf(stderr, _(" -v --version: version info\n"));
|
fprintf(stderr, _(" -v --version: version info\n"));
|
||||||
@ -150,7 +150,7 @@ int main(int argc, char **argv) {
|
|||||||
|
|
||||||
char opt1[255], opt2[255];
|
char opt1[255], opt2[255];
|
||||||
for (arg = 0; arg < argc; arg++) {
|
for (arg = 0; arg < argc; arg++) {
|
||||||
if (strcmp(argv[arg], "-o") == 0 && arg + 1 < argc) {
|
if (strcmp(argv[arg], "-c") == 0 && arg + 1 < argc) {
|
||||||
strncpy(opt1, argv[arg + 1], 255);
|
strncpy(opt1, argv[arg + 1], 255);
|
||||||
*(strchr(opt1, '=')) = 0;
|
*(strchr(opt1, '=')) = 0;
|
||||||
strncpy(opt2, strchr(argv[arg + 1], '=') + 1, 255);
|
strncpy(opt2, strchr(argv[arg + 1], '=') + 1, 255);
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
tesseract \- command\-line OCR engine
|
tesseract \- command\-line OCR engine
|
||||||
.SH "SYNOPSIS"
|
.SH "SYNOPSIS"
|
||||||
.sp
|
.sp
|
||||||
\fBtesseract\fR \fIimagename\fR \fIoutbase\fR|\fIstdout\fR [\fI\-l lang\fR] [\fI\-psm N\fR] [\gI\-o configvar=value\fR] [\fIconfigfile\fR \&...]
|
\fBtesseract\fR \fIimagename\fR \fIoutbase\fR|\fIstdout\fR [\fI\-l lang\fR] [\fI\-psm N\fR] [\gI\-c configvar=value\fR] [\fIconfigfile\fR \&...]
|
||||||
.SH "DESCRIPTION"
|
.SH "DESCRIPTION"
|
||||||
.sp
|
.sp
|
||||||
tesseract(1) is a commercial quality OCR engine originally developed at HP between 1985 and 1995\&. In 1995, this engine was among the top 3 evaluated by UNLV\&. It was open\-sourced by HP and UNLV in 2005, and has been developed at Google since then\&.
|
tesseract(1) is a commercial quality OCR engine originally developed at HP between 1985 and 1995\&. In 1995, this engine was among the top 3 evaluated by UNLV\&. It was open\-sourced by HP and UNLV in 2005, and has been developed at Google since then\&.
|
||||||
@ -80,9 +80,9 @@ are:
|
|||||||
.\}
|
.\}
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\fI\-o configvar=value\fR
|
\fI\-c configvar=value\fR
|
||||||
.RS 4
|
.RS 4
|
||||||
Sets a configuration variable\&. Multiple options can be set by using -o multiple times, once for each option\&.
|
Sets a configuration variable\&. Multiple options can be set by using -c multiple times, once for each option\&.
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\fI\-v\fR
|
\fI\-v\fR
|
||||||
@ -107,7 +107,7 @@ hocr \- Output in hOCR format instead of as a text file\&.
|
|||||||
.RE
|
.RE
|
||||||
.RE
|
.RE
|
||||||
.sp
|
.sp
|
||||||
\fBNota Bene:\fR The options \fI\-l lang\fR, \fI\-psm N\fR and \fI\-o configvar=value\fR must occur before any \fIconfigfile\fR\&.
|
\fBNota Bene:\fR The options \fI\-l lang\fR, \fI\-psm N\fR and \fI\-c configvar=value\fR must occur before any \fIconfigfile\fR\&.
|
||||||
.SH "LANGUAGES"
|
.SH "LANGUAGES"
|
||||||
.sp
|
.sp
|
||||||
There are currently language packs available for the following languages:
|
There are currently language packs available for the following languages:
|
||||||
|
Loading…
Reference in New Issue
Block a user