Difference between pages "Product Opener/Installation" and "Translations - Discover page - German"

From Open Food Facts wiki
(Difference between pages)
Jump to navigation Jump to search
 
 
Line 1: Line 1:
Installation instructions for ProductOpener (see [[Project:ProductOpener]]).
+
Go back to the main [[Translations]] page.
 
+
You can replace the English text with the appropriate translation. To edit the page, please login using your Open Food Facts account on http://world.openfoodfacts.org first.
== Before you start ==
+
[[Category:Translations]]
 
+
[[Category:German]]
ProductOpener is not yet released as open source. The instructions below are for reference and for early testers of ProductOpener. 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.
 
 
 
When it is released, ProductOpener will have much easier to use install scripts and instructions.
 
 
 
== Install directory ==
 
 
 
Instructions below use /home/obf for the install directory, replace with your install dir.
 
 
 
== ProductOpener code ==
 
 
 
=== Configuration ===
 
 
 
==== startup.pl ====
 
 
 
This file is used to preload Perl module in Apache.
 
It contains a path that needs to be updated:
 
 
 
 
<pre>
 
<pre>
# Needs to be configured
+
<!-- no side column -->
use lib "/home/obf/cgi/";
 
</pre>
 
  
==== Config.pm ====
+
<div class="row">
 +
<div class="text-center small-12 medium-4 columns">
 +
<img src="/images/svg/openfoodfacts-logo-en.svg" width="100%" style="max-width:356px" alt="Open Food Facts" />
 +
</div>
 +
<div class="small-12 medium-8 columns text-right hide-for-small" style="border-left:none,border-right: 1px solid #DDDDDD;">
 +
<h1>Open Food Facts</h1>
 +
<h2 class="subheader">The free food products database.</h2>
 +
<blockquote style="border-left:none;border-right: 1px solid #DDDDDD;">Tell me what you eat and I will tell you what you are.
 +
<cite>Jean Anthelme Brillat-Savarin - 1825</cite></blockquote>
  
==== Config2.pm ====
+
</div>
  
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.
+
</div>
  
<pre>
+
<hr>
# server constants
 
$domain = "openbeautyfacts.org";
 
  
# server paths
+
<div class="row text-center">
$www_root = "/home/obf/html";
+
<div class="large-12 columns">
$data_root = "/home/obf";
+
<h2>Open your food and know what you eat</h2>
 +
<h4 class="subheader">Be part of our collaborative, free and open database of food products from around the world!</h4>
 +
</div>
 +
</div>
 +
<div class="row text-center">
 +
<div class="medium-4 columns">
 +
<img src="/images/svg/food-database-icon.svg" alt="A food products database" />
 +
<h3>A food products database</h3>
 +
<p>Open Food Facts is a database of food products with ingredients, allergens, nutrition facts and all
 +
the tidbits of information we can find on product labels.
 +
</p>
 +
</div>
 +
 +
<div class="medium-4 columns">
 +
<img src="/images/svg/crowdsourcing-icon.svg" alt="Made by everyone - Crowdsourcing" />
 +
<h3>Made by everyone</h3>
 +
<p>Open Food Facts is a non-profit association of volunteers.</p>
 +
<p>1800+ contributors like you have added 43&nbsp;000+ products from 150 countries using our
 +
<a href="https://play.google.com/store/apps/details?id=org.openfoodfacts.scanner">Android</a>,
 +
<a href="https://itunes.apple.com/en/app/open-food-facts/id588797948">iPhone</a> or
 +
<a href="http://www.windowsphone.com/en-us/store/app/openfoodfacts/5d7cf939-cfd9-4ac0-86d7-91b946f4df34">Windows Phone</a> app
 +
or their camera to scan barcodes and upload pictures of products and their labels.
 +
</p>
 +
</div>
  
$mongodb = "obf";
+
<div class="medium-4 columns">
</pre>
+
<img src="/images/svg/opendata-crowd-icon.svg" alt="For everyone - Open data" />
 
+
<h3>For everyone</h3>
== MongoDB database ==
+
<p>Data about food is of public interest and has to be open.
 
+
The complete database is published as open data
== Apache servers ==
+
and can be reused by anyone and for any use. Check-out the <a href="#reuses">cool reuses</a> or make your own!
 
+
</p>
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.
+
</div>
 +
</div>
  
If the trafic is low or moderate, you can use only one Apache mod_perl server that also serves images etc.
+
<hr>
  
In the example below, the Apache mod_perl server listens on port 19000.
+
<div class="row text-center">
 +
<div class="large-12 columns">
 +
<h2>Make better food choices</h2>
 +
<h4 class="subheader">Knowledge is power. Food knowledge is power to eat better!</h4>
 +
</div>
 +
</div>
  
=== Light-weight reverse proxy for static files ===
+
<ul class="text-center small-block-grid-1 medium-block-grid-2 large-block-grid-4">
 +
<li>
 +
<img src="/images/svg/decode-labels-icon.svg" alt="Decode labels" />
 +
<h3>Decode labels</h3>
 +
<p>Food additives E-numbers, allergens, packaging codes... Open Food Facts helps you to make sense of
 +
the fine print on products labels.
 +
</p>
 +
<img src="/images/svg/nutrition-grade-icon.svg" alt="Nutrition grade"/>
 +
<p>We also grade the nutritional quality of each product.</p>
 +
</li>
 +
 +
<li>
 +
<img src="/images/svg/find-products-icon.svg" alt="Find products"/>
 +
<h3>Find products</h3>
 +
<p>Our <a href="/cgi/search.pl">search form</a> includes dozens of criteria so that you can find
 +
product that match your criteria.
 +
</p>
 +
</li>
  
Add to httpd.conf:
+
<li>
 +
<a href="http://world.openfoodfacts.org/cgi/search.pl?action=process&tagtype_0=categories&tag_contains_0=contains&tag_0=Breakfast%20cereals&sort_by=unique_scans_n&page_size=20&axis_x=sugars&axis_y=fat&series_nutrition_grades=on&graph=1">
 +
<img src="/images/svg/compare-graph-icon.320x240.png" alt="Compare products"/></a>
 +
<h3>Compare and change</h3>
 +
<p>Do you know which breakfast cereals have the less fat and sugar? In 3 clicks you can create
 +
an interactive graph to show it. So you can change for healthier cereals, and by comparing products
 +
from different brands, you encourage producers to make them better.
 +
</p>
 +
</li>
 +
 +
<li>
 +
<a href="/label/fair-trade/origins"><img src="/images/svg/fairtrade-origins-min.svg" alt="Origins of ingredients of Fair Trade products" /></a>
 +
<h3>Explore and discover</h3>
 +
<p>Curious about food? Explore products by facets like brands, categories,
 +
labels, origins of ingredients etc. Facets can be combined to discover new insights,
 +
for instance to map the <a href="/label/fair-trade/origins">origins of ingredients that bear a fair trade label</a>.
 +
</p>
 +
</li>
 +
</ul>
  
<pre>
+
<hr>
  
<VirtualHost *>
+
<div class="row text-center">
DocumentRoot /home/obf/html
+
<div class="large-12 columns">
ServerName world.openbeautyfacts.org
+
<h2>Food for thought, innovation and science</h2>
ServerAlias *.openbeautyfacts.org
+
<h4 class="subheader">Our data can be reused for education, new products and services, research and more!</h4>
 +
<p class="text-left">The Open Food Facts database is open data published under the Open Database Licence. Anyone can use it
 +
for any purpose - commercial or non-commercial - provided the source of the data is attributed and improvements to the
 +
database are shared in a similar way.</p>
 +
</div>
 +
</div>
 +
<div class="row text-center" data-equalizer id="reuses">
 +
<div class="medium-4 columns">
 +
<div data-equalizer-watch>
 +
<h3>Education</h3>
 +
<p>How many food commercials have you seen in your life? Open data can help to see the facts under the marketing.</p>
 +
</div>
 +
<a href="http://howmuchsugar.in"><img src="/images/svg/howmuchsugar-icon.svg" alt="How much sugar?" /></a>
 +
<h4 class="subheader">How much sugar?</h4>
 +
<p>Can you guess the equivalent amount of sugar cubes in your food? Try <a href="http://howmuchsugar.in">How much sugar?</a> to find out.</p>
 +
</div>
 +
 +
<div class="medium-4 columns">
 +
<div data-equalizer-watch>
 +
<h3>Products and services</h3>
 +
<p>Open Food Facts data can be reused in both non-commercial and commercial projects, as long as improvements to the database
 +
are shared as well.</p>
 +
</div>
 +
<a href="http://madenear.me"><img src="/images/svg/madenearme-icon.png" alt="Made Near Me" /></a>
 +
<h4 class="subheader">Made Near Me</h4>
 +
<p>Know where your food comes from and Eat Local with <a href="http://madenear.me">Made Near Me!</a></p>
 +
</div>
 +
 +
<div class="medium-4 columns">
 +
<div data-equalizer-watch>
 +
<h3>Science</h3>
 +
<p>Open Food Facts data is used by scientists in different fields (Nutrition, Biology, Linked Open Data...).
 +
And you don't need a PhD to take part in citizen science!</p>
 +
</div>
 +
<img src="/images/svg/science-icon.svg" alt="Science" />
 +
<h4 class="subheader">Nutrition grades</h4>
 +
<p>The French National Nutrition and Health Program uses Open Food Facts data to validate the formula of its nutrition quality score
 +
and nutrition grades.</p>
 +
</div>
 +
 +
</div>
 +
<div class="row text-center">
 +
<div class="large-12 columns">
 +
<p>See <a href="/reuses">all reuses</a>, or <a href="/data">check out our data</a> to create yours!</p>
 +
</div>
 +
</div>
  
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>
 
</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
 

Revision as of 20:33, 10 May 2015

Go back to the main Translations page. You can replace the English text with the appropriate translation. To edit the page, please login using your Open Food Facts account on http://world.openfoodfacts.org first.

<!-- no side column -->

<div class="row">
	<div class="text-center small-12 medium-4 columns">
		<img src="/images/svg/openfoodfacts-logo-en.svg" width="100%" style="max-width:356px" alt="Open Food Facts" />
	</div>
	<div class="small-12 medium-8 columns text-right hide-for-small" style="border-left:none,border-right: 1px solid #DDDDDD;">
		<h1>Open Food Facts</h1>
		<h2 class="subheader">The free food products database.</h2>
		<blockquote style="border-left:none;border-right: 1px solid #DDDDDD;">Tell me what you eat and I will tell you what you are.
		<cite>Jean Anthelme Brillat-Savarin - 1825</cite></blockquote>

	</div>

</div>

<hr>

<div class="row text-center">
	<div class="large-12 columns">
		<h2>Open your food and know what you eat</h2>
		<h4 class="subheader">Be part of our collaborative, free and open database of food products from around the world!</h4>
	</div>
</div>
<div class="row text-center">
	<div class="medium-4 columns">
		<img src="/images/svg/food-database-icon.svg" alt="A food products database" />
		<h3>A food products database</h3>
		<p>Open Food Facts is a database of food products with ingredients, allergens, nutrition facts and all
		the tidbits of information we can find on product labels.
		</p>
	</div>
	
	<div class="medium-4 columns">
		<img src="/images/svg/crowdsourcing-icon.svg" alt="Made by everyone - Crowdsourcing" />	
		<h3>Made by everyone</h3>
		<p>Open Food Facts is a non-profit association of volunteers.</p>
		<p>1800+ contributors like you have added 43 000+ products from 150 countries using our
<a href="https://play.google.com/store/apps/details?id=org.openfoodfacts.scanner">Android</a>,
<a href="https://itunes.apple.com/en/app/open-food-facts/id588797948">iPhone</a> or
<a href="http://www.windowsphone.com/en-us/store/app/openfoodfacts/5d7cf939-cfd9-4ac0-86d7-91b946f4df34">Windows Phone</a> app
or their camera to scan barcodes and upload pictures of products and their labels.
		</p>
	</div>

	<div class="medium-4 columns">
		<img src="/images/svg/opendata-crowd-icon.svg" alt="For everyone - Open data" />	
		<h3>For everyone</h3>
		<p>Data about food is of public interest and has to be open.
The complete database is published as open data
and can be reused by anyone and for any use. Check-out the <a href="#reuses">cool reuses</a> or make your own!
		</p>
	</div>
</div>

<hr>

<div class="row text-center">
	<div class="large-12 columns">
		<h2>Make better food choices</h2>
		<h4 class="subheader">Knowledge is power. Food knowledge is power to eat better!</h4>
	</div>
</div>

<ul class="text-center small-block-grid-1 medium-block-grid-2 large-block-grid-4">
	<li>
		<img src="/images/svg/decode-labels-icon.svg" alt="Decode labels" />
		<h3>Decode labels</h3>
		<p>Food additives E-numbers, allergens, packaging codes... Open Food Facts helps you to make sense of
the fine print on products labels.
		</p>
		<img src="/images/svg/nutrition-grade-icon.svg" alt="Nutrition grade"/>
		<p>We also grade the nutritional quality of each product.</p>
	</li>
	
	<li>
		<img src="/images/svg/find-products-icon.svg" alt="Find products"/>
		<h3>Find products</h3>
		<p>Our <a href="/cgi/search.pl">search form</a> includes dozens of criteria so that you can find
product that match your criteria.
		</p>
	</li>

	<li>
		<a href="http://world.openfoodfacts.org/cgi/search.pl?action=process&tagtype_0=categories&tag_contains_0=contains&tag_0=Breakfast%20cereals&sort_by=unique_scans_n&page_size=20&axis_x=sugars&axis_y=fat&series_nutrition_grades=on&graph=1">
		<img src="/images/svg/compare-graph-icon.320x240.png" alt="Compare products"/></a>
		<h3>Compare and change</h3>
		<p>Do you know which breakfast cereals have the less fat and sugar? In 3 clicks you can create
an interactive graph to show it. So you can change for healthier cereals, and by comparing products
from different brands, you encourage producers to make them better.
		</p>
	</li>
	
	<li>
		<a href="/label/fair-trade/origins"><img src="/images/svg/fairtrade-origins-min.svg" alt="Origins of ingredients of Fair Trade products" /></a>
		<h3>Explore and discover</h3>
		<p>Curious about food? Explore products by facets like brands, categories,
labels, origins of ingredients etc. Facets can be combined to discover new insights,
for instance to map the <a href="/label/fair-trade/origins">origins of ingredients that bear a fair trade label</a>.
		</p>
	</li>
</ul>

<hr>

<div class="row text-center">
	<div class="large-12 columns">
		<h2>Food for thought, innovation and science</h2>
		<h4 class="subheader">Our data can be reused for education, new products and services, research and more!</h4>
		<p class="text-left">The Open Food Facts database is open data published under the Open Database Licence. Anyone can use it
for any purpose - commercial or non-commercial - provided the source of the data is attributed and improvements to the
database are shared in a similar way.</p>
	</div>
</div>
<div class="row text-center" data-equalizer id="reuses">
	<div class="medium-4 columns">
		<div data-equalizer-watch>
			<h3>Education</h3>
			<p>How many food commercials have you seen in your life? Open data can help to see the facts under the marketing.</p>
		</div>
		<a href="http://howmuchsugar.in"><img src="/images/svg/howmuchsugar-icon.svg" alt="How much sugar?" /></a>
		<h4 class="subheader">How much sugar?</h4>
		<p>Can you guess the equivalent amount of sugar cubes in your food? Try <a href="http://howmuchsugar.in">How much sugar?</a> to find out.</p>
	</div>
	
	<div class="medium-4 columns">
		<div data-equalizer-watch>
			<h3>Products and services</h3>
			<p>Open Food Facts data can be reused in both non-commercial and commercial projects, as long as improvements to the database
are shared as well.</p>			
		</div>
		<a href="http://madenear.me"><img src="/images/svg/madenearme-icon.png" alt="Made Near Me" /></a>
		<h4 class="subheader">Made Near Me</h4>
		<p>Know where your food comes from and Eat Local with <a href="http://madenear.me">Made Near Me!</a></p>
	</div>	
	
	<div class="medium-4 columns">
		<div data-equalizer-watch>
			<h3>Science</h3>
			<p>Open Food Facts data is used by scientists in different fields (Nutrition, Biology, Linked Open Data...).
			And you don't need a PhD to take part in citizen science!</p>
		</div>
		<img src="/images/svg/science-icon.svg" alt="Science" />
		<h4 class="subheader">Nutrition grades</h4>
		<p>The French National Nutrition and Health Program uses Open Food Facts data to validate the formula of its nutrition quality score
		and nutrition grades.</p>
	</div>	
	
</div>
<div class="row text-center">
	<div class="large-12 columns">
		<p>See <a href="/reuses">all reuses</a>, or <a href="/data">check out our data</a> to create yours!</p>
	</div>
</div>