General weighted average calculator built for the modern web.

README.md

gwa

General weighted average calculator built for the modern web.

GitHub tag Build Status devDependencies Greenkeeper badge GitHub license

Features

  • GWA calculation for Philippine Science High School students
  • Support for optional electives for Grade 10 PSHS students
  • Support for defining a custom set of subjects (for college students)
  • Progressive web app (can run offline on supported browsers/devices)
  • Night mode (can be automatically enabled at sunset)
  • Cumulative GPA calculation mode (experimental)

Building

This project uses Gulp to generate the needed HTML, CSS, and JS files. For example, index.html is generated by combining the HTML files inside src/html_components/, and the main script.js is generated by combining and minifying all of the JavaScript files inside src/js/.

To build the calculator on your machine, you will need a working installation of Node.js.

Once you have Node.js installed, clone the repository locally and install the required Node.js modules (the following steps are for Linux/macOS):

git clone https://github.com/illustra/gwa.git
cd gwa
npm install -g gulp-cli
npm install

You also need to download the JavaScript libraries used by the calculator:

mkdir -p dist/js
curl 'https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js' > dist/js/jquery.min.js
curl 'https://cdnjs.cloudflare.com/ajax/libs/fastclick/1.0.6/fastclick.min.js' > dist/js/fastclick.min.js
curl 'https://cdnjs.cloudflare.com/ajax/libs/jquery.touchswipe/1.6.18/jquery.touchSwipe.min.js' > dist/js/touchswipe.min.js
curl 'https://cdnjs.cloudflare.com/ajax/libs/webfont/1.6.28/webfontloader.js' > dist/js/webfontloader.min.js
curl 'https://cdnjs.cloudflare.com/ajax/libs/suncalc/1.8.0/suncalc.min.js' > dist/js/suncalc.min.js
curl 'https://cdn.jsdelivr.net/npm/vanilla-ripplejs@1.0.6' > dist/js/ripple.min.js

You are now ready to make your changes to the files inside src/. When you're done, build the calculator:

gulp all

Open the resulting index.html with your favorite browser.

Contributing

The calculator is automatically built with Travis to make updating and testing easier. NPM dependencies are also automatically updated by Greenkeeper.

If you have a suggestion for the calculator, you can either

  • send me a message about it here, or
  • make a pull request on this repository if you have some code to share!

Credits

License

pisaygwa: The quick, responsive GWA calculator for PSHS and college students.
Copyright (C) 2016-2018 Aurel Jared Dantis

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

forthebadge forthebadge forthebadge