Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/staticf0x/daylio-stats
A Django web app to generate stats from Daylio exports
https://github.com/staticf0x/daylio-stats
django matplotlib numpy python
Last synced: 3 days ago
JSON representation
A Django web app to generate stats from Daylio exports
- Host: GitHub
- URL: https://github.com/staticf0x/daylio-stats
- Owner: staticf0x
- License: mit
- Created: 2020-05-10T15:21:54.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-04-17T09:37:05.000Z (9 months ago)
- Last Synced: 2024-04-24T05:26:01.903Z (9 months ago)
- Topics: django, matplotlib, numpy, python
- Language: Python
- Homepage:
- Size: 2.84 MB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# daylio-stats
A tool to generate stats/charts from Daylio CSV exports.
Currently supports:
- Creating a chart of all data since the beginning of tracking
- Smoothing the chart with a rolling averageLocally you can use:
```
$ ./manage.py generate_charts
```to get more charts than we're able to generate now on Heroku.
## Running locally
### Installation
After cloning the repo:
- `$ npm install` (this is only for development currently)
- `$ poetry install`### Secret key for Django
Either set the `DS_SECRET_KEY` env variable directly, or read the key from a file.
For bash:
```bash
$ export DS_SECRET_KEY=$(cat .ds_secret_key)
```For fish:
```fish
$ set -x DS_SECRET_KEY (cat .ds_secret_key)
```Or just create `.env` file and put it in there:
```
DS_SECRET_KEY=...
```### Database password
Same as with the secret key:
Either set the `DS_DB_PASSWORD` env variable directly, or read the key from a file.
For bash:
```bash
$ export DS_DB_PASSWORD=$(cat .ds_db_password)
```For fish:
```fish
$ set -x DS_DB_PASSWORD (cat .ds_db_password)
```### Setting the dev environment
Go to `dayliostats/settings.py` and set
```python
DEBUG = True
ADMIN = True
```### Run the development server
For port 8000:
```
$ poetry shell
$ ./manage.py runserver 8000
```### Or use gunicorn
```
$ gunicorn dayliostats.wsgi
```### Or use Docker
```
$ docker run --rm -e DS_SECRET_KEY="" -p 8000:8000 daylio-stats
```## Running tests
```
$ ./manage.py test
```