chiark / gitweb /
count is count of offers
[ypp-sc-tools.web-live.git] / pctb / convert.c
index e262b26c858b0ea0dda3da03a0549933be9d33fd..75c70804df7b7d4632e9ee9967540f873c21d313 100644 (file)
@@ -51,6 +51,7 @@ static char *o_screenshot_fn;
 static int o_single_page, o_quiet;
 static const char *o_outputmode= "upload";
 
+const char *o_resolver;
 FILE *screenshot_file;
 
 
@@ -77,6 +78,10 @@ static void run_analysis(void) {
   progress("running recognition...");
   analyse(tf);
 
+  if (o_single_page && !strcmp(o_outputmode,"upload"))
+    fatal("Recognition successful, but refusing to upload partial data\n"
+         " (--single-page specified).  Specify an output mode?");
+
   sysassert( fseek(tf,0,SEEK_SET) == 0);
 
   progress_log("processing results (--%s)...", o_outputmode);
@@ -110,10 +115,14 @@ int main(int argc, char **argv) {
     else if (!strcmp(arg,"--analyse-only") ||
             !strcmp(arg,"--same"))
       o_mode= mode_analyse;
+    else if (!strcmp(arg,"--everything"))
+      o_mode= mode_all;
     else if (!strcmp(arg,"--single-page"))
       o_single_page= 1;
     else if (!strcmp(arg,"--quiet"))
       o_quiet= 1;
+    else if (!strcmp(arg,"--edit-charset"))
+      o_resolver= "./yppsc-ocr-resolver";
     else if (!strcmp(arg,"--raw-tsv"))
       o_outputmode= 0;
     else if (!strcmp(arg,"--upload") ||