# JAJ Task Manager

A super simple task manager designed to be used on mobile devices and also displayed on an E-Paper display.

## Setup

### Checkout

Simply check out this project somewhere in a web-accessible folder.

### Database

The system uses MySQL/MariaDB for SQL. Create a database (i.e. "tasklist") and a user with full access to that database. Import the installation database file into that newly created database.

```bash
mysql --host=DBHOST --user=DBUSER -p DBNAME < install/tasklist.sql
```

* __DBHOST__ : This is the host name or IP address for the SQL server
* __DBUSER__ : This is the user name having access to the database for this project
* __DBNAME__ : This is the name of the database created in MySQL/MariaDB

_The "-p" parameter will make the import command above request the password for the database user at run time._

### Configuration

The settings under the OpenWeatherMap and Database sections are likely the only relevant changes required for operation.

## Weather API

The system uses [OpenWeather](https://openweathermap.org/) to get local weather data, sunrise, sunset times, etc. An API key is needed from them so an account must be created. The system should be configured to retrieve weather data slowly enough to not require anything but the free tier even for detailed weather information (API 3.0). The most recent response from the API call will be stored in the database.

Running a simple cron job should suffice:

```bash
0,10,20,30,40,50 * * * * /usr/local/bin/php /var/www/htdocs/t/weather.php 1>/dev/null 2>&1
```

Obviously, paths to both PHP and the `weather.php` script included in this repository should be set according to the local environment.
