Ismo Vuorinen f02a999279 Lentolaskuri is officially AGPL licensed software
Required
- License and copyright notice
- State Changes
- Disclose Source

Permitted
- Commercial Use
- Modification
- Distribution
- Private Use

Forbidden
- Hold Liable
- Sublicensing
2013-11-20 09:49:13 +02:00
2013-05-13 11:43:34 +03:00
2013-05-13 11:43:34 +03:00
2013-05-13 11:43:34 +03:00
2013-06-24 21:21:41 +03:00
2013-06-24 21:21:41 +03:00

Lentolaskuri

Flight CO2 emission calculator.

Uses Grunt: The JavaScript Task Runner.

Installation

Prerequisites

  • Webserver that runs PHP to poll the airport data
  • MySQL server to hold the data
  • npm, bower and grunt to fetch dependencies and to build the project

Lentolaskuri has been tested and build using tested on MAMP and LAMP stack.

Dependencies

See bower.json and package.json for complete list of packages.

To install required packages run in the project folder in your terminal of choise:

npm install && bower install

Building the project

grunt server   # Start development server
grunt          # Build minified and optimized version for release to /dist -folder

Configuration

  1. Configure database access in app/api/config.sample.php and save as app/api/config.php. The config.php file gets ignored in .gitignore so no worries.
  2. Build project using grunt, this generates dist folder
  3. Push files and folders in dist/* to your server, for example as http://example.com/lentolaskuri
  4. Set up MySQL database table to your server and import airport data to your database:
    • Visit http://example.com/lentolaskuri/api/import.php to create mysql table automagically (or import app/api/lentolaskuri.sql by hand, but change table name to one you used in config.php)
    • Change variable $config['create_table'] to false in app/api/config.php to prevent further table creation attempts
    • ProTip: You can make cron or similar visit this url weekly to update the latest airport data from openflights database
  5. Test your lentolaskuri application
  6. Donate money based on emissions to a good cause

Credits

Airport data comes from OpenFlights.org (airports.dat, AGPL)

Description
No description provided
Readme 186 KiB
Languages
JavaScript 62.9%
HTML 16.3%
PHP 10.6%
Handlebars 5.5%
Less 4.7%