chiark / gitweb /
pager: cap screenshot interval at 1s to avoid problems at volatile markets
[ypp-sc-tools.db-test.git] / yarrg / convert.c
index 3c9ae9c85cecfd48dea317975a4d17e8f869ed79..4ba23b514d45a6363ab6336c9a37dcd3daed63a6 100644 (file)
@@ -94,7 +94,7 @@ static void run_analysis(void) {
   analyse(tf);
 
   if (o_flags & ff_upload) {
-    if (npages<=1)
+    if (o_flags & ff_singlepage)
       fatal("Recognition successful, but refusing to upload partial data\n"
            " (--single-page specified).  Specify an output mode?");
   }
@@ -117,9 +117,9 @@ static void run_analysis(void) {
     }
 
     waitpid_check_exitstatus(processor, "output processor/uploader", 0);
-    fclose(tf);
   }
   
+  fclose(tf);
   progress_log("all complete.");
 }
 
@@ -262,6 +262,7 @@ int main(int argc, char **argv) {
     else if (IS("--dict-read-only"))   o_flags &= (~ffs_dict | ff_dict_fetch);
     else if (IS("--dict-anon"))        o_flags &= ~ff_dict_pirate;
     else if (IS("--dict-submit"))      o_flags |= ff_dict_fetch|ff_dict_submit;
+    else if (IS("--dict-no-update"))   o_flags &= ~ff_dict_fetch; // testing
     else if (IS("--raw-tsv"))          outputmode(omk_raw,0);
     else if (IS("--upload"))           outputmode_uploads();
     else if (IS("--upload-yarrg"))     outputmode(omk_upload_yarrg,arg+2);
@@ -331,7 +332,7 @@ int main(int argc, char **argv) {
             o_serv_yarrg,       o_flags & ff_use_yarrg);
 
   set_server("YPPSC_YARRG_PCTB",
-            "http://",          "pctb.ilk.org" /*pctb.crabdance.com*/,
+            "http://",          "pctb.crabdance.com",
                                 "pctb.ilk.org",
             o_serv_pctb,        o_flags & ff_use_pctb);