chiark
/
gitweb
/
~yarrgweb
/
ypp-sc-tools.db-test.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
OCR rejection infrastructure
[ypp-sc-tools.db-test.git]
/
pctb
/
convert.c
diff --git
a/pctb/convert.c
b/pctb/convert.c
index 6f40f94cd0c5cc7d1772a1d4cee9d78047b5539c..3250d183a940caa8397b75e502ed3237b5303e67 100644
(file)
--- a/
pctb/convert.c
+++ b/
pctb/convert.c
@@
-92,7
+92,7
@@
static void run_analysis(void) {
analyse(tf);
if (o_flags & ff_upload) {
analyse(tf);
if (o_flags & ff_upload) {
- if (
o_flags & ff_singlepage
)
+ if (
npages<=1
)
fatal("Recognition successful, but refusing to upload partial data\n"
" (--single-page specified). Specify an output mode?");
}
fatal("Recognition successful, but refusing to upload partial data\n"
" (--single-page specified). Specify an output mode?");
}
@@
-127,7
+127,7
@@
void fetch_with_rsync(const char *stem) {
if (DEBUGP(rsync))
fprintf(stderr,"executing rsync to fetch %s to %s\n",remote,local);
execlp(rsync, "rsync",
if (DEBUGP(rsync))
fprintf(stderr,"executing rsync to fetch %s to %s\n",remote,local);
execlp(rsync, "rsync",
- DEBUGP(rsync) ? "-
vLt" : "-
Lt",
+ DEBUGP(rsync) ? "-
zvLt" : "-z
Lt",
"--",remote,local,(char*)0);
sysassert(!"exec rsync failed");
}
"--",remote,local,(char*)0);
sysassert(!"exec rsync failed");
}
@@
-195,7
+195,8
@@
int main(int argc, char **argv) {
else if (IS("--find-island")) o_flags |= ffs_printisland;
else if (IS("--single-page")) o_flags |= ff_singlepage;
else if (IS("--quiet")) o_quiet= 1;
else if (IS("--find-island")) o_flags |= ffs_printisland;
else if (IS("--single-page")) o_flags |= ff_singlepage;
else if (IS("--quiet")) o_quiet= 1;
- else if (IS("--edit-charset")) o_flags |= ff_editcharset;
+ else if (IS("--edit-charset")) o_flags |= ff_charset_edit;
+ else if (IS("--no-edit-charset")) o_flags &= ~(ffm_charset);
else if (IS("--test-servers")) o_flags |= ff_testservers;
else if (IS("--dict-local-only")) o_flags &= ~ffs_dict;
else if (IS("--dict-read-only")) o_flags &= (~ffs_dict | ff_dict_fetch);
else if (IS("--test-servers")) o_flags |= ff_testservers;
else if (IS("--dict-local-only")) o_flags &= ~ffs_dict;
else if (IS("--dict-read-only")) o_flags &= (~ffs_dict | ff_dict_fetch);
@@
-297,13
+298,15
@@
int main(int argc, char **argv) {
progress_log("OK for you to move the mouse now.");
}
if (o_mode & mf_readscreenshot) {
progress_log("OK for you to move the mouse now.");
}
if (o_mode & mf_readscreenshot) {
+ if ((o_flags & ff_upload) && !(o_flags & ff_testservers))
+ badusage("must not reuse screenshots for upload to live PCTB database");
open_screenshot_file("r");
if (o_flags & ff_singlepage) read_one_screenshot();
else read_screenshots();
}
if (o_mode & mf_analyse) {
if (o_flags & ff_needisland) {
open_screenshot_file("r");
if (o_flags & ff_singlepage) read_one_screenshot();
else read_screenshots();
}
if (o_mode & mf_analyse) {
if (o_flags & ff_needisland) {
- find_islandname(page
0_rgbimage
);
+ find_islandname(page
_images[0]->rgb
);
if (o_flags & ff_printisland)
printf("%s, %s\n", archipelago, island);
sysassert(! setenv("YPPSC_ISLAND",island,1) );
if (o_flags & ff_printisland)
printf("%s, %s\n", archipelago, island);
sysassert(! setenv("YPPSC_ISLAND",island,1) );