Italian petrol pumps comparator
This web app allows you to list in a map and sort all fuel suppliers who are in a particular area, also it provides the current prices on every suppliers.
We have engineered this solution in a Hackathon that was sponsored by Facile.it, an Italian price comparator. This submission won the competition.
Use the http://fuel.reyboz.it online mirror. It has data updated on a daily basis.
Heroes and original technologies in the /about.php page of the online mirror.
Go in your
www folder and clone the source code using GNU Bazaar:
bzr branch lp:it-fuel-stations-comparator
Have GNU/Linux, PHP and MySQL/MariaDB working.
This project is built over the Boz-PHP - Another PHP framework. Install it in your
bzr branch lp:boz-php-another-php-framework /usr/share/boz-php-another-php-framework
Import in MySQL/MariaDB the
database-schema.sql from the
Also in the
installation folder copy the
load-sample.php in the root folder as
load.php and fill with your MySQL/MariaDB credentials.
Remember to run the
cli/localize.sh twice to enable translations.
Remember to install the
libjs-leaflet php-gettext packages.
Import data from MISE
Please download data from the Italian Ministero dello Sviluppo Economico:
They are released under the terms of the Italian Open Data License v2.0.
Manually import MISE .csv
cli/import-mise.php helps you:
php ./cli/import-mise.php anagrafica_impianti_attivi.csv prezzo_alle_8.csv
Automatically download and import MISE .csv
Put a similar line in your cronjob:
/var/www/cli/download-import-mise.sh "php /var/www/cli/import-mise.php"
su www-data -s /bin/sh -c '/var/www/cli/download-import-mise.sh "php /var/www/cli/import-mise.php"'
Push in Launchpad:
Translations are easily made using GNU Gettext. See the
l10n/ folder structure. Use something as Poedit to edit existing
.po files or to create a new one from the
Remember to run the
cli/localize.sh script before editing a
.po file. Also run it twice when you finished.
The site language switcher is in the
load-post.php. That part sucks but it works.
This is a Free as in Freedom project. It comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under the terms of the GNU Affero General Public License v3+.