Changes

Jump to navigation Jump to search
4 bytes added ,  19:11, 1 May 2020
no edit summary
Line 4: Line 4:  
# Get all the products that are ingredients complete AND have selected images
 
# Get all the products that are ingredients complete AND have selected images
 
# Loop through products
 
# Loop through products
wget -O - -q -t 1 http://fr.openfoodfacts.org/api/v0/produit/20396145.json | jq '.product.states_hierarchy'
+
wget -O - -q -t 1 https://fr.openfoodfacts.org/api/v0/produit/20396145.json | jq '.product.states_hierarchy'
 
string='My long string';
 
string='My long string';
 
if [[ $string == *"en:photos-validated"* ]] and if [[ $string == *"en:ingredients-completed"* ]] then
 
if [[ $string == *"en:photos-validated"* ]] and if [[ $string == *"en:ingredients-completed"* ]] then
Line 10: Line 10:     
if "en:photos-validated" and "en:ingredients-completed" in output:
 
if "en:photos-validated" and "en:ingredients-completed" in output:
wget -O - -q -t 1 http://fr.openfoodfacts.org/api/v0/produit/20396145.json | jq '.product.ingredients_text'
+
wget -O - -q -t 1 https://fr.openfoodfacts.org/api/v0/produit/20396145.json | jq '.product.ingredients_text'
wget -O - -q -t 1 http://fr.openfoodfacts.org/api/v0/produit/20396145.json | jq '.product.image_url'  
+
wget -O - -q -t 1 https://fr.openfoodfacts.org/api/v0/produit/20396145.json | jq '.product.image_url'  
wget -O - -q -t 1 http://fr.openfoodfacts.org/api/v0/produit/20396145.json | jq '.product.image_url' | tesseract  outputocrfull.txt -l fra -psm 3
+
wget -O - -q -t 1 https://fr.openfoodfacts.org/api/v0/produit/20396145.json | jq '.product.image_url' | tesseract  outputocrfull.txt -l fra -psm 3
 
tesseract ingredients.19.full.jpg outputocrfull.txt -l fra -psm 3
 
tesseract ingredients.19.full.jpg outputocrfull.txt -l fra -psm 3
 
diff file1.txt file2.txt
 
diff file1.txt file2.txt

Navigation menu