Changes

Jump to navigation Jump to search
69 bytes added ,  14:35, 29 October 2016
Line 2,064: Line 2,064:  
We start from a source image (defined by barcode and id) as selected for ingredients. We ask Product Opener to process it (process_image=1). Product Opener returns a JSON. Processing is done using Tesseract (3 on preprod). The result is often cripped with error. Take steps to avoid direct copy pasting into the ingredients field by your users.
 
We start from a source image (defined by barcode and id) as selected for ingredients. We ask Product Opener to process it (process_image=1). Product Opener returns a JSON. Processing is done using Tesseract (3 on preprod). The result is often cripped with error. Take steps to avoid direct copy pasting into the ingredients field by your users.
    +
<pre>Test server: http://world.openfoodfacts.net/cgi/ingredients.pl</pre>
 +
<pre>Live server: http://world.openfoodfacts.net/cgi/ingredients.pl</pre>
 +
===== Values and output =====
 +
<pre>
 +
code=code
 +
id=imagefield
 +
process_image=1
 +
</pre>
 +
 +
This will return JSON
 +
 +
===== Ignore me =====
 
<pre>
 
<pre>
 
$.post('/cgi/ingredients.pl',
 
$.post('/cgi/ingredients.pl',
Line 2,079: Line 2,091:  
}, 'json');
 
}, 'json');
 
</pre>
 
</pre>
<pre>http://world.openfoodfacts.net/cgi/ingredients.pl?code=code&id=imagefield&process_image=1</pre>
  −
  −
===== Values and output =====
  −
<pre>
  −
code=code
  −
id=imagefield
  −
process_image=1
  −
</pre>
  −
  −
This will return JSON
      
=== Posting a new product ===
 
=== Posting a new product ===

Navigation menu