Difference between pages "Product Opener/Installation" and "Translations - Contribute page - Hebrew"

From Open Food Facts wiki
(Difference between pages)
Jump to navigation Jump to search
 
(Created page with "Go back to the main Translations page. Category:Translations Please replace the English text below in your language. <pre> <!-- no side column --> <div class="row"...")
 
Line 1: Line 1:
Installation instructions for Product Opener (see [[Project:Product Opener]]).
+
Go back to the main [[Translations]] page.
 
+
[[Category:Translations]]
== Before you start ==
 
 
 
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.
 
 
 
When it is released, Product Opener 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.
 
 
 
== Product Opener code ==
 
 
 
=== Configuration ===
 
 
 
==== startup.pl ====
 
 
 
This file is used to preload Perl module in Apache.
 
It contains a path that needs to be updated:
 
 
 
<pre>
 
# Needs to be configured
 
use lib "/home/obf/cgi/";
 
</pre>
 
 
 
==== Config.pm ====
 
 
 
==== Config2.pm ====
 
 
 
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.
 
 
 
<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
 
  
 +
Please replace the English text below in your language.
  
 
<pre>
 
<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 ==
 
 
Install Mongodb.
 
 
The mongodb database name is configured in cgi/Config.pm
 
 
The mongodb database is created when the first product is added.
 
 
=== MongoDB indexes ===
 
  
See [[Product Opener mongodb indexes]]
+
<!-- no side column -->
  
== Apache servers ==
+
<div class="row">
  
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 class="small-12 medium-8 columns">
 +
<h1>Contribute to Open Food Facts</h1>
 +
<h2 class="subheader">All you need is a scan-do attitude! :-)</h2>
 +
<!-- note to translators: you can replace "All you need is a scan-do attitude!" by a sentence that works better
 +
for your language. Something that says that it's easy to contribute and that all that is needed is good will and a positive / can-do attitude -->
 +
<blockquote>Can we make the food industry more open and transparent? Yes we scan!
 +
<!-- note to translators: please translate "Can we make the food industry more open and transparent" but keep "Yes we scan!" in English -->
 +
<cite>1863 Open Food Facts contributors and growing - Since 2012</cite></blockquote>
 +
</div>
 +
 +
<div class="text-center small-12 medium-4 columns">
 +
<img src="/images/svg/crowdsourcing-icon.svg" width="100%" style="max-width:356px" alt="Yes we scan!" />
 +
</div>
  
If the trafic is low or moderate, you can use only one Apache mod_perl server that also serves images etc.
+
</div>
  
In the example below, the Apache mod_perl server listens on port 19000.
+
<hr>
  
=== Light-weight reverse proxy for static files ===
+
<div class="row text-center">
 +
<div class="large-12 columns">
 +
<h2>Everyone can contribute</h2>
 +
<h4 class="subheader">Be part of our collaborative, free and open database of food products from around the world!</h4>
 +
<p>Open Food Facts is a non-profit project made entirely by volunteers, we do need you.</p>
  
Compile:
+
</div>
 +
</div>
 +
<div class="row text-center">
 +
<div class="medium-4 columns">
 +
<h3>Add products</h3>
 +
<p>Use 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 to
 +
easily scan the barcode of products from your home or local stores and upload pictures of their label.</p>
 +
<p>No smartphone? No problem: you can also use your camera to add products directly on the web site.</p>
 +
<p>On the web site you can also fill in the information for products you added or others added.</p>
 +
</div>
 +
 +
<div class="medium-4 columns">
 +
<h3>Tell the world</h3>
 +
<p>Do you like Open Food Facts? Tell others about it!</p>
 +
<p>You can present the project to your family and friends, show them how to install the app and contribute,
 +
write a blog post, share Open Food Facts on social media...</p>
 +
<p>And present it live! We have presented Open Food Facts to very different audiences in very different settings, and
 +
we always get a very enthusiastic response when we show what can be done when the data for products is open. We have lots
 +
of <a href="/presentations">presentation materials</a> (slides etc.) that you can adapt or present as-is.</p>
 +
 +
</div>
  
./configure --prefix=/home/xyz/proxy --enable-rewrite --enable-proxy --enable-proxy_http --disable-userdir --enable-headers --enable-expires --enable-mime --enable-so --with-included-apr
+
<div class="medium-4 columns">
 +
<h3>Make it local</h3>
 +
<p>You can help to <a href="http://en.wiki.openfoodfacts.org/Translations">translate</a> the site and mobile app in your language,
 +
and to translate presentations, announcements etc.</p>
 +
<p>We can work together to support and add logos for local labels, to decode local packager codes so that we can map products etc.</p>
 +
<p>Start or join a local contributors community: add local products, recruit friends, present the project in local meetups and
 +
conferences etc.</p>
 +
</div>
 +
</div>
  
Add to httpd.conf:
+
<hr>
  
<pre>
+
<div class="row text-center">
 +
<div class="large-12 columns">
 +
<h2>Expert help needed</h2>
 +
<p>Developing Open Food Facts also requires specialized knowledge and expertise in many different areas:</p>
 +
</div>
 +
</div>
  
<VirtualHost *>
+
<ul class="text-center small-block-grid-1 medium-block-grid-2 large-block-grid-3">
DocumentRoot /home/obf/html
+
<li>
ServerName world.openbeautyfacts.org
+
<h3>Project management</h3>
ServerAlias *.openbeautyfacts.org
+
<p>We have tons of ideas and you probably have even more, but it is quite a challenge to prioritize them,
 +
to build a roadmap, and to manage projects when every participant is a volunteer with often limited time available.</p>
 +
</li>
 +
 +
<li>
 +
<h3>Design</h3>
 +
<p>We need help to build a better user experience on the Open Food Facts web site and mobile app, to improve
 +
their design, to create impactful presentation materials etc.</p>
 +
</li>
  
ErrorLog /home/obf/logs/proxy_error_log
+
<li>
CustomLog /home/obf/logs/proxy_access_log combined
+
<h3>Development</h3>
ServerAdmin stephane@openbeautyfacts.org
+
<p>We have a lot of development work to do: on the Open Food Facts backend (Perl and MongoDB), API (JSON),
 +
web site (HTML5, JS, Foundation), iOS / Android / Windows Phone / FirefoxOS apps
 +
(currently developed in HTML and JS with Apache Cordova / Phonegap), to build new cool reuses etc.
 +
Our code is on <a href="https://github.com/openfoodfacts">GitHub</a>.
  
<Directory "/home/obf/html">
+
</li>
    Options -Indexes FollowSymLinks
+
    Order allow,deny
+
<li>
    Allow from all
+
<h3>Community building</h3>
</Directory>
+
<p>We need to build local communities in all countries and at the same time unite them globally.</p>
RewriteEngine on
+
<p>It is very difficult to bootstrap a local community in a country without living there, so your help
RewriteCond  %{REQUEST_URI}  !/./
+
to find the first very motivated participants is essential. Are you one of them?</p>
RewriteRule ^(/cgi/.*)$ http://localhost:19000$1 [P,L]
+
</li>
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>
 
  
 +
<li>
 +
<h3>Communication</h3>
 +
<p>We are not sure what to write here, could you help?</p>
 +
<p>More seriously, there are lot of cool things that users, contributors and reusers do with Open Food Facts,
 +
it would be great to get more people to know about it. In particular we need help for public
 +
and <a href="/presse">media relations</a>.</p>
 +
 +
</li>
 +
 +
<li>
 +
<h3>Special projects</h3>
 +
<p>There are lots of interesting and original applications of food open data that we could work on with
 +
government food agencies, food producers, researchers, universities, schools, NGOs etc. Maybe you already have ideas?
 +
If you do, please help us to push them forward.</p>
 +
</li>
 +
</ul>
  
<VirtualHost *>
+
<hr>
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>
+
<div class="row text-center">
 +
<div class="large-12 columns">
 +
<h2>Let's talk!</h2>
 +
<h4 class="subheader">A lot of ideas, energy and enthusiasm are shared in our contributors community, join us!</h4>
 +
<p>Here are some places where you can meet other contributors, talk to them and work with them:</p>
 +
</div>
 +
</div>
  
</pre>
+
<ul class="text-center small-block-grid-1 medium-block-grid-2 large-block-grid-3">
 +
<li>
 +
<h3>Slack</h3>
 +
<p>Slack is the best way to interact and collaborate with other contributors, developers and reusers. It's a discussion forum
 +
you can access from your browser or your phone. It completely changed how we work together. Please try it, click on the button
 +
below to get invited to our Slack.</p>
 +
<script async defer src="http://slack.openfoodfacts.org/slackin.js"></script>
 +
</li>
 +
 +
<li>
 +
<h3>Facebook groups</h3>
 +
<p>We have <a href="https://www.facebook.com/groups/374350705955208/permalink/902105433179730/">Facebook groups for Open Food Facts contributors</a> in many languages. Joining them is a good way to get news about
 +
the project and to share announcements to a wider audience. </p>
 +
</li>
  
=== modperl Apache server for dynamic pages ===
+
<li>
 +
<h3>Wiki</h3>
 +
<p>We also have a <a href="http://en.wiki.openfoodfacts.org/">wiki</a> that we use to collaboratively document Open Food Facts and its sub-projects. We also use the wiki
 +
to manage <a href="http://en.wiki.openfoodfacts.org/Translations">translations</a> and to work on the <a href="http://en.wiki.openfoodfacts.org/Global_taxonomies">taxonomies / hierarchies</a> of categories, labels etc.</p>
 +
</li>
 +
</ul>
  
* download the latest version of the source of the Apache httpd server from the 2.2 branch (2.2.29 when writing this)
+
<hr>
** 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/
+
<div class="row text-center">
* extract the source
+
<div class="large-12 columns">
* perl Makefile.PL MP_APXS=/home/obf/apache/bin/apxs
+
<p>There are many more ways to contribute to Open Food Facts, please <a href="http://slack.openfoodfacts.org">join us on Slack</a> and let's start the discussion!</p>
* make
+
</div>
* make install
+
</div>
  
==== 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>
 
</pre>
 
 
== Installation issues ==
 
 
Depending on your environment (in particular different versions of Linux, Apache, MongoDB, Perl, Perl modules etc.), you may encounter some issues when installing or running Product Opener.
 
 
[[Product Opener installation issues]] lists those issues and steps to resolve them.
 

Revision as of 08:31, 9 May 2015

Go back to the main Translations page.

Please replace the English text below in your language.


<!-- no side column -->

<div class="row">

	<div class="small-12 medium-8 columns">
		<h1>Contribute to Open Food Facts</h1>
		<h2 class="subheader">All you need is a scan-do attitude! :-)</h2>
		<!-- note to translators: you can replace "All you need is a scan-do attitude!" by a sentence that works better
		for your language. Something that says that it's easy to contribute and that all that is needed is good will and a positive / can-do attitude -->
		<blockquote>Can we make the food industry more open and transparent? Yes we scan!
		<!-- note to translators: please translate "Can we make the food industry more open and transparent" but keep "Yes we scan!" in English -->
		<cite>1863 Open Food Facts contributors and growing - Since 2012</cite></blockquote>
	</div>
	
	<div class="text-center small-12 medium-4 columns">
		<img src="/images/svg/crowdsourcing-icon.svg" width="100%" style="max-width:356px" alt="Yes we scan!" />
	</div>	

</div>

<hr>

<div class="row text-center">
	<div class="large-12 columns">
		<h2>Everyone can contribute</h2>
		<h4 class="subheader">Be part of our collaborative, free and open database of food products from around the world!</h4>
		<p>Open Food Facts is a non-profit project made entirely by volunteers, we do need you.</p>

	</div>
</div>
<div class="row text-center">
	<div class="medium-4 columns">
		<h3>Add products</h3>
		<p>Use 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 to
easily scan the barcode of products from your home or local stores and upload pictures of their label.</p>
		<p>No smartphone? No problem: you can also use your camera to add products directly on the web site.</p>
		<p>On the web site you can also fill in the information for products you added or others added.</p>
	</div>
	
	<div class="medium-4 columns">
		<h3>Tell the world</h3>
		<p>Do you like Open Food Facts? Tell others about it!</p>
		<p>You can present the project to your family and friends, show them how to install the app and contribute,
		write a blog post, share Open Food Facts on social media...</p>
		<p>And present it live! We have presented Open Food Facts to very different audiences in very different settings, and
we always get a very enthusiastic response when we show what can be done when the data for products is open. We have lots
of <a href="/presentations">presentation materials</a> (slides etc.) that you can adapt or present as-is.</p>
	
	</div>

	<div class="medium-4 columns">
		<h3>Make it local</h3>
		<p>You can help to <a href="http://en.wiki.openfoodfacts.org/Translations">translate</a> the site and mobile app in your language,
and to translate presentations, announcements etc.</p>
		<p>We can work together to support and add logos for local labels, to decode local packager codes so that we can map products etc.</p>
		<p>Start or join a local contributors community: add local products, recruit friends, present the project in local meetups and
		conferences etc.</p>
	</div>
</div>

<hr>

<div class="row text-center">
	<div class="large-12 columns">
		<h2>Expert help needed</h2>
		<p>Developing Open Food Facts also requires specialized knowledge and expertise in many different areas:</p>
	</div>
</div>

<ul class="text-center small-block-grid-1 medium-block-grid-2 large-block-grid-3">
	<li>
		<h3>Project management</h3>
		<p>We have tons of ideas and you probably have even more, but it is quite a challenge to prioritize them,
to build a roadmap, and to manage projects when every participant is a volunteer with often limited time available.</p>
	</li>
	
	<li>
		<h3>Design</h3>
		<p>We need help to build a better user experience on the Open Food Facts web site and mobile app, to improve
their design, to create impactful presentation materials etc.</p>
	</li>

	<li>
		<h3>Development</h3>
		<p>We have a lot of development work to do: on the Open Food Facts backend (Perl and MongoDB), API (JSON),
		web site (HTML5, JS, Foundation), iOS / Android / Windows Phone / FirefoxOS apps
(currently developed in HTML and JS with Apache Cordova / Phonegap), to build new cool reuses etc.
Our code is on <a href="https://github.com/openfoodfacts">GitHub</a>.

	</li>
	
	<li>
		<h3>Community building</h3>
		<p>We need to build local communities in all countries and at the same time unite them globally.</p>
		<p>It is very difficult to bootstrap a local community in a country without living there, so your help
		to find the first very motivated participants is essential. Are you one of them?</p>
	</li>

	<li>
		<h3>Communication</h3>
		<p>We are not sure what to write here, could you help?</p>
		<p>More seriously, there are lot of cool things that users, contributors and reusers do with Open Food Facts,
		it would be great to get more people to know about it. In particular we need help for public
		and <a href="/presse">media relations</a>.</p>
		
	</li>	
	
	<li>
		<h3>Special projects</h3>
		<p>There are lots of interesting and original applications of food open data that we could work on with
		government food agencies, food producers, researchers, universities, schools, NGOs etc. Maybe you already have ideas?
		If you do, please help us to push them forward.</p>
	</li>	
</ul>

<hr>

<div class="row text-center">
	<div class="large-12 columns">
		<h2>Let's talk!</h2>
		<h4 class="subheader">A lot of ideas, energy and enthusiasm are shared in our contributors community, join us!</h4>
		<p>Here are some places where you can meet other contributors, talk to them and work with them:</p>
	</div>
</div>

<ul class="text-center small-block-grid-1 medium-block-grid-2 large-block-grid-3">
	<li>
		<h3>Slack</h3>
		<p>Slack is the best way to interact and collaborate with other contributors, developers and reusers. It's a discussion forum
		you can access from your browser or your phone. It completely changed how we work together. Please try it, click on the button
		below to get invited to our Slack.</p>
		<script async defer src="http://slack.openfoodfacts.org/slackin.js"></script>
	</li>
	
	<li>
		<h3>Facebook groups</h3>
		<p>We have <a href="https://www.facebook.com/groups/374350705955208/permalink/902105433179730/">Facebook groups for Open Food Facts contributors</a> in many languages. Joining them is a good way to get news about
		the project and to share announcements to a wider audience. </p>
	</li>

	<li>
		<h3>Wiki</h3>
		<p>We also have a <a href="http://en.wiki.openfoodfacts.org/">wiki</a> that we use to collaboratively document Open Food Facts and its sub-projects. We also use the wiki
		to manage <a href="http://en.wiki.openfoodfacts.org/Translations">translations</a> and to work on the <a href="http://en.wiki.openfoodfacts.org/Global_taxonomies">taxonomies / hierarchies</a> of categories, labels etc.</p>
	</li>	
</ul>

<hr>

<div class="row text-center">
	<div class="large-12 columns">
		<p>There are many more ways to contribute to Open Food Facts, please <a href="http://slack.openfoodfacts.org">join us on Slack</a> and let's start the discussion!</p>
	</div>
</div>