Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update doc #6

Merged
merged 1 commit into from
May 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
```