From a2e54cccc323d3b6d7cddf430a6765b71f8bd105 Mon Sep 17 00:00:00 2001 From: Fred C Date: Wed, 22 May 2024 14:43:02 +0200 Subject: [PATCH] update doc --- docs/source/installation.md | 42 ++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) 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 +```