chiark / gitweb /
document the options
authorIan Jackson <ian@liberator.relativity.greenend.org.uk>
Sun, 7 Jun 2009 23:13:25 +0000 (00:13 +0100)
committerIan Jackson <ian@liberator.relativity.greenend.org.uk>
Sun, 7 Jun 2009 23:13:25 +0000 (00:13 +0100)
pctb/README
pctb/convert.c

index 938f0dec190743ff25b3f2e8f118fdc10e2b7ebf..5f1cea2e7dfe6e6cd67f50e34ff62aaa600faf13 100644 (file)
@@ -4,7 +4,7 @@ This tool can:
   - **TODO** upload the results to PCTB
 
 To run it, change to this directory, type `make', and then:
   - **TODO** upload the results to PCTB
 
 To run it, change to this directory, type `make', and then:
-  ./ypp-commodities >commods.csv
+  ./ypp-commodities --tsv >commods.tsv
 
 It may put up a window asking about characters it does not understand.
 It is important to get these inputs right or it may misrecognise
 
 It may put up a window asking about characters it does not understand.
 It is important to get these inputs right or it may misrecognise
@@ -16,3 +16,25 @@ error message and circumstances.  Also, for recognition problems there
 will probably be a very useful screenshot file called `#pages#.pnm'.
 This is likely to be very large so don't just email it to me, but if
 you can put it up on a webpage for me to download that will help.
 will probably be a very useful screenshot file called `#pages#.pnm'.
 This is likely to be very large so don't just email it to me, but if
 you can put it up on a webpage for me to download that will help.
+
+Options available:
+
+ Setting the operation mode:
+   --find-window-only       Just check that we can find the YPP client window.
+   --screenshot-only        Page through and take screenshots, do not OCR
+   --analyse-only | --same  Process previously taken screenshots
+   --everything (default)   Take screenshots and process them
+
+ Options to vary the processing:
+   --single-page         One screenful, no paging - results will be incomplete
+   --quiet               Suppress progress messages
+   --screenshot-file F   Store or read screenshots in F rather than #pages#.pnm
+   --window-id ID        Specified X window is the YPP client - do not search
+
+ Setting the output processing:
+   --raw-tsv          Dump the raw not deduped unsorted OCR'd data
+   --upload (default) Upload to the PCTB server
+   --tsv              Print data as clean tab-separated-values file
+   --best-prices      Print best buy and sell price for each commodity
+   --arbitrage        Print arbitrage opportunityes
+
index e262b26c858b0ea0dda3da03a0549933be9d33fd..eb7536d6fac4bcc3014f2b7c35880602febc3820 100644 (file)
@@ -110,6 +110,8 @@ int main(int argc, char **argv) {
     else if (!strcmp(arg,"--analyse-only") ||
             !strcmp(arg,"--same"))
       o_mode= mode_analyse;
     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"))
     else if (!strcmp(arg,"--single-page"))
       o_single_page= 1;
     else if (!strcmp(arg,"--quiet"))