Compare commits
1 commit
c952a45aec
...
c8ac1d9322
Author | SHA1 | Date | |
---|---|---|---|
c8ac1d9322 |
1 changed files with 12 additions and 30 deletions
42
README.md
42
README.md
|
@ -1,61 +1,43 @@
|
||||||
# TRMNL Weather & Pollen Report
|
# trmnl weather & pollen report
|
||||||
|
|
||||||
A custom TRMNL plugin that fetches and displays weather and pollen data.
|
a custom trmnl plugin that fetches and displays weather and pollen data.
|
||||||
|
|
||||||
## Setup
|
## setup
|
||||||
|
|
||||||
1. Set up a virtual environment and install dependencies:
|
1. set up a virtual environment and install dependencies:
|
||||||
```bash
|
```bash
|
||||||
python -m venv .venv
|
python -m venv .venv
|
||||||
source .venv/bin/activate
|
source .venv/bin/activate
|
||||||
uv sync
|
uv sync
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Set required environment variables:
|
2. set required environment variables:
|
||||||
```bash
|
```bash
|
||||||
export WEATHER_API_KEY="your_openweathermap_api_key"
|
export WEATHER_API_KEY="your_openweathermap_api_key"
|
||||||
export AUTH_TOKEN="your_chosen_auth_token"
|
export AUTH_TOKEN="your_chosen_auth_token"
|
||||||
```
|
```
|
||||||
|
|
||||||
3. Run the application:
|
3. run the application:
|
||||||
```bash
|
```bash
|
||||||
fastapi run main.py --port 8887
|
fastapi run main.py --port 8887
|
||||||
```
|
```
|
||||||
|
|
||||||
## Development
|
## development
|
||||||
|
|
||||||
### Install Development Dependencies
|
### install development dependencies
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
make dev-install
|
make dev-install
|
||||||
```
|
```
|
||||||
|
|
||||||
### Code Quality
|
## docker
|
||||||
|
|
||||||
This project uses [Ruff](https://docs.astral.sh/ruff/) for linting and formatting.
|
build and run with docker:
|
||||||
|
|
||||||
**Available commands:**
|
|
||||||
|
|
||||||
```bash
|
|
||||||
make lint
|
|
||||||
|
|
||||||
make format
|
|
||||||
|
|
||||||
make lint-fix
|
|
||||||
|
|
||||||
make check
|
|
||||||
|
|
||||||
make clean
|
|
||||||
```
|
|
||||||
|
|
||||||
## Docker
|
|
||||||
|
|
||||||
Build and run with Docker:
|
|
||||||
```bash
|
```bash
|
||||||
docker build -t trmnl-report .
|
docker build -t trmnl-report .
|
||||||
docker run -p 8887:8887 -e WEATHER_API_KEY=your_key -e AUTH_TOKEN=your_token trmnl-report
|
docker run -p 8887:8887 -e WEATHER_API_KEY=your_key -e AUTH_TOKEN=your_token trmnl-report
|
||||||
```
|
```
|
||||||
|
|
||||||
## API
|
## api
|
||||||
|
|
||||||
Access the API at `http://localhost:8887/?token=your_auth_token`
|
access the api at `http://localhost:8887/?token=your_auth_token`
|
Loading…
Add table
Add a link
Reference in a new issue