Changes

Jump to navigation Jump to search
adding a few noteworthy products
Line 1: Line 1: −
Installation instructions for Product Opener (see [[Project:Product Opener]]).
+
DRAFT BEING TRANSLATED
 +
== Products with several byproducts ==
 +
Several lists of ingredients and several nutritional tables.
   −
== Before you start ==
+
* {{Product|3270160602483}}
 +
* {{Product|8712566342822}} nutritional table contains two sub tables for caramel ice cream and the other for chocolate
 +
* {{Product|3041090027918}} sticks for babies with a table for each
 +
* {{Product|5054070216996}} yogurts with 2 different flavours => 2 different lists of ingredients and 2 nutritional tables
 +
* {{Product|00868860}} yogurts with 4 different flavours => 4 different lists of ingredients and 4 nutritional tables
   −
Product Opener is not yet released as open source. The instructions below are for reference and for early testers of Product Opener. They are very likely to change as the code will be restructured, made more independent of proprietary code and specific Open Food Facts uses etc.
+
== Products with same bar code ==
 +
* Candy brand "Sami Sweet" ( Leader Price): {{Product|7290013316110 }}
 +
* Wheat bran Carrefour Bio : {{Product|3560070522279}}
 +
* Chocolate ice cream with chocolate chips Picard: {{Product|3270160277605}}
 +
* Organic Basmati Rice and Ethiquable Alter Eco : {{Product|3700214610121}}
   −
When it is released, Product Opener will have much easier to use install scripts and instructions.
+
== Different products in different countries ==
   −
== Install directory ==
+
* Http://fr.openfoodfacts.org/produit/5449000011527/fanta-orange : Swiss Fanta has the same barcode as the French Fanta manu1400 but it looks like ( the picture is blurred ..) that the ingredients are different
   −
Instructions below use /home/obf for the install directory, replace with your install dir.
+
== Products with strange nutritional information ==
   −
== Product Opener code ==
+
{{Product|3335122723382}}: Mix information " per 100g ", " per 100ml ", " g / l "
 +
* Cookies brand " Michel et Augustin" , developed in Paris , formulate sentences with nutritional information and ingredients for some cookies ( not the entire package .) Ingredients "classics" are against full labeled in English , for example: {{Product|3760122961951 }}
 +
{{Product|6132500680018}}: Presence of vitamin difficult to read (B22 ? ) .
 +
{{Product|3367651001303}}: the weight of a sandwich is not specified , but information are provided in the table.
 +
{{Product|5000183505458}}: 6.1g carbohydrates of which 6.9g sugars? There's something fishy in this tomato and smoked bacon sauce!
   −
=== Configuration ===
+
== Products to remove ==
 +
* See [[Products to remove]]
   −
==== startup.pl ====
+
== Preparing for foods ==
 +
Their peculiarity is that it requires an array of unique nutritional values ​​, because the values ​​of the product as it does not really make sense , I do not know whether to put in the database the two values ​​, or alternatively, if must keep one, I think the nutritional value of the product when prepared is more interesting because it is what we want . (Currently I put the values ​​of the product as it is waiting for a ARMONISATION )
 +
- [[ User: Syaoran | Syaoran ] ] ([ [ User talk : Syaoran | discussion ]] ) September 22, 2013 at 21:32 (CEST)
   −
This file is used to preload Perl module in Apache.
+
== Products whose recipe has changed ==
It contains a path that needs to be updated:
+
{{Product|3041090018398}} : see pictures of ingredients labels .
   −
<pre>
+
== Products compared with European regulations ==
# Needs to be configured
+
=== Labeling ===
use lib "/home/obf/cgi/";
+
==== On casein and caseinates food ====
</pre>
     −
==== Config.pm ====
+
* Note: [http://www.codexalimentarius.org/input/download/standards/185/CXS_290e.pdf CODEX STANDARD FOR EDIBLE CASEIN PRODUCTS] (contains a list of various additives are casein)
 +
* [http://europa.eu/legislation_summaries/consumers/product_labelling_and_packaging/l21128_fr.htm Regulations on casein and caseinates]
   −
==== Config2.pm ====
+
" Without prejudice to Community provisions on food labeling , labeling of casein and caseinates must include:
 +
: * For caseinates : the cation or cations ;
 +
: * ( ... ) "
   −
Contains info about the domain, database and path. This is separated from Config.pm so that it is easy to create test instance that share the same configuration in Config.pm but are on other domains.
+
{{Product|3270160812936}} labeling of ingredients in this dish prepared on caseinates ( "sodium caseinate") seems correct.
 
+
[[fr:Produits_remarquables]]
<pre>
  −
# server constants
  −
$domain = "openbeautyfacts.org";
  −
 
  −
# server paths
  −
$www_root = "/home/obf/html";
  −
$data_root = "/home/obf";
  −
 
  −
$mongodb = "obf";
  −
</pre>
  −
 
  −
=== Required Perl modules ===
  −
 
  −
The following Perl modules need to be installed (some of them might be included with Perl).
  −
 
  −
To install a module, you can sometimes use packages.
  −
 
  −
e.g. on Debian / Ubuntu :  apt-get install libdatetime-perl
  −
 
  −
Or you can use cpan:
  −
 
  −
cpan install DateTime
  −
 
  −
 
  −
<pre>
  −
Cache::Memcached::Fast
  −
Crypt::PasswdMD5
  −
DateTime
  −
DateTime::Format::Mail
  −
Digest::MD5
  −
Digest::SHA1
  −
Encode::Punycode
  −
File::Copy
  −
File::Path
  −
Geo::IP
  −
Getopt::Long
  −
GraphViz2
  −
Hash::Util
  −
HTML::Defang
  −
HTML::Entities
  −
Image::Magick
  −
Image::OCR::Tesseract
  −
IPC::Open3
  −
JSON
  −
LWP::Authen::Digest
  −
</pre>
  −
 
  −
== MongoDB database ==
  −
 
  −
== Apache servers ==
  −
 
  −
In production we use a light weight Apache web server for static files (e.g. images) that does reverse proxying to a modperl Apache server that dynamically generates the HTML pages.
  −
 
  −
If the trafic is low or moderate, you can use only one Apache mod_perl server that also serves images etc.
  −
 
  −
In the example below, the Apache mod_perl server listens on port 19000.
  −
 
  −
=== Light-weight reverse proxy for static files ===
  −
 
  −
Add to httpd.conf:
  −
 
  −
<pre>
  −
 
  −
<VirtualHost *>
  −
DocumentRoot /home/obf/html
  −
ServerName world.openbeautyfacts.org
  −
ServerAlias *.openbeautyfacts.org
  −
 
  −
ErrorLog /home/obf/logs/proxy_error_log
  −
CustomLog /home/obf/logs/proxy_access_log combined
  −
ServerAdmin stephane@openbeautyfacts.org
  −
 
  −
<Directory "/home/obf/html">
  −
    Options -Indexes FollowSymLinks
  −
    Order allow,deny
  −
    Allow from all
  −
</Directory>
  −
RewriteEngine on
  −
RewriteCond  %{REQUEST_URI}  !/./
  −
RewriteRule ^(/cgi/.*)$ http://localhost:19000$1 [P,L]
  −
RewriteMap escape int:escape
  −
RewriteRule ^/favicon.ico$ /favicon.ico [L]
  −
RewriteCond  %{REQUEST_URI}  !^/images/
  −
RewriteCond  %{REQUEST_URI}  !^/js/
  −
RewriteCond  %{REQUEST_URI}  !^/rss/
  −
RewriteCond  %{REQUEST_URI}  !^/robots
  −
RewriteCond  %{REQUEST_URI}  !^/clicks/
  −
RewriteCond  %{REQUEST_URI}  !^/data/
  −
RewriteCond  %{REQUEST_URI}  !^/files/
  −
RewriteRule  ^(.*)$ http://localhost:19000/cgi/display.pl?${escape:$1} [P,L,QSA]
  −
</VirtualHost>
  −
 
  −
 
  −
<VirtualHost *>
  −
DocumentRoot /home/obf/html
  −
ServerName openbeautyfacts.org
  −
ErrorLog /home/obf/logs/proxy_error_log
  −
CustomLog /home/obf/logs/proxy_access_log combined
  −
DirectoryIndex index.html index.shtml
  −
<Directory "/home/obf/html">
  −
    Options -Indexes FollowSymLinks Includes
  −
    Order allow,deny
  −
    Allow from all
  −
</Directory>
  −
RewriteEngine on
  −
RewriteCond %{HTTP_HOST} ^openbeautyfacts\.org
  −
RewriteRule ^/products$ /products.shtml [L]
  −
 
  −
</VirtualHost>
  −
 
  −
</pre>
  −
 
  −
=== modperl Apache server for dynamic pages ===
  −
 
  −
* download the latest version of the source of the Apache httpd server from the 2.2 branch (2.2.29 when writing this)
  −
** do not use the 2.4 branch as mod_perl is not yet compatible with it
  −
* extract the source
  −
* ./configure --with-mpm=prefork --prefix=/home/obf/apache --enable-rewrite --enable-proxy --enable-proxy_http --enable-deflate --disable-userdir --enable-headers
  −
* make
  −
* make install
  −
 
  −
* download the latest version of mod_perl from http://perl.apache.org/
  −
* extract the source
  −
* perl Makefile.PL MP_APXS=/home/obf/apache/bin/apxs
  −
* make
  −
* make install
  −
 
  −
==== Configuration ====
  −
 
  −
In /home/obf/apache/conf/httpd.conf:
  −
 
  −
Change the port:
  −
 
  −
Listen 19000
  −
 
  −
Add at the end:
  −
 
  −
<pre>
  −
PerlWarn Off
  −
PerlRequire /home/obf/cgi/startup.pl
  −
 
  −
 
  −
<Location /cgi>
  −
SetHandler perl-script
  −
PerlResponseHandler ModPerl::Registry
  −
PerlOptions +ParseHeaders
  −
Options +ExecCGI
  −
Order allow,deny
  −
Allow from all
  −
</Location>
  −
 
  −
 
  −
<VirtualHost *>
  −
DocumentRoot /home/obf/html
  −
ServerName world.openbeautyfacts.org
  −
ErrorLog /home/obf/logs/error_log
  −
CustomLog /home/obf/logs/access_log combined
  −
ScriptAlias /cgi/ "/home/obf/cgi/"
  −
</VirtualHost>
  −
 
  −
PerlPostReadRequestHandler My::ProxyRemoteAddr
  −
</pre>
 
277

edits

Navigation menu