Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/janhancic/cigarettecounter
A really simple mobile counter app.
https://github.com/janhancic/cigarettecounter
Last synced: 22 days ago
JSON representation
A really simple mobile counter app.
- Host: GitHub
- URL: https://github.com/janhancic/cigarettecounter
- Owner: janhancic
- License: mit
- Created: 2013-09-03T22:00:21.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2013-10-12T15:01:35.000Z (about 11 years ago)
- Last Synced: 2024-04-14T19:15:47.682Z (7 months ago)
- Language: JavaScript
- Homepage: http://janhancic.github.io/CigaretteCounter/
- Size: 202 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# CigaretteCounter
A simple (and quickly hacked together) mobile web "app" I've made for myself to track how much I smoke each day. It stores it's data in `localStorage` and the data gets reset every day. Note that it has only been tested on desktop Chrome and on Dolphin on Android.It also sends data to the [reportr](http://www.reportr.io/) service for historical collection and nice graphs.
## How to use
### Easy mode
Copy `build/index.html` to a web server of your choice and that's it (if you don't want to integrate with reportr).### Lazy mode
Bookmark [janhancic.github.io/CigaretteCounter](http://janhancic.github.io/CigaretteCounter/) in your mobile browser and enjoy.### Advanced mode
Run it locally:```
git clone https://github.com/janhancic/CigaretteCounter.git
cd CigaretteCounter
npm install
grunt
```This will install dependencies and start a local static server, which you can access on `localhost:8080/src/index.html`.
If you make any changes, run `grunt make` which will provide you with a "production" version of the `index.html` file (`build/index.html`) with `src/app.js` minified and in-lined.
## Reportr integration
If you want to send data to reportr (either your own instance or the one running on [www.reportr.io](http://www.reportr.io/)) you'll have to create two configuration files:`src/config.js`, which should contain:
```javascript
window.app = (function () {
var app = window.app || {};
app.useReportr = true;
return app;
} () );
```And `src/reportr.config.php`, which should contain:
```php
```
With this in place run `grunt make`, which will copy everything to the `build` folder, and then you can copy that to your web server which must support PHP in order for the reporting to work.
## Plans
I'll probably add some support to store historic data, but for now this is all I need.## License
Licensed under MIT. See `LICENSE.md` file for details.[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/janhancic/cigarettecounter/trend.png)](https://bitdeli.com/free "Bitdeli Badge")