Skip to content

Commit

Permalink
Merge pull request #6 from lpoaura/updatedoc
Browse files Browse the repository at this point in the history
update doc
  • Loading branch information
lpofredc committed May 22, 2024
2 parents d470dad + a2e54cc commit 0fc02cf
Showing 1 changed file with 41 additions and 1 deletion.
42 changes: 41 additions & 1 deletion docs/source/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <env file>
weatherlink2pg full
```

### Update

```sh
source weatherlink_env/bin/activate
source <env file>
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
```

0 comments on commit 0fc02cf

Please sign in to comment.