diff --git a/docs/source/installation.md b/docs/source/installation.md index 8b9b20f..1ac18a8 100644 --- a/docs/source/installation.md +++ b/docs/source/installation.md @@ -3,9 +3,49 @@ ## Installation ```bash +python3 venv weatherlink_venv pip install weatherlink2pg ``` ## Usage -Coming soon... +Usage require some variable environment as mentionned in file `.env.sample` +for weatherlink api authentication and database connection. + +### Full download + +Required as first launch + +```sh +source weatherlink_env/bin/activate +source +weatherlink2pg full +``` + +### Update + +```sh +source weatherlink_env/bin/activate +source +weatherlink2pg update +``` + +### crontask + +recommanded way to update data using cron tasks + +Create a script with the following code + +```bash +#!/bin/bash + +SCRIPT_RELATIVE_DIR=$(dirname "${BASH_SOURCE[0]}") + +source $SCRIPT_RELATIVE_DIR/bin/activate + +set -a # automatically export all variables +source $SCRIPT_RELATIVE_DIR/.weatherlink2pg.env +set +a + +weatherlink2pg update +```