/wtw-running

🎽 What to wear running

Primary LanguageRustMIT LicenseMIT

🎽 What to wear running

MIT license build status

A CLI tool and Alexa skill that recommends a running outfit for you based on weather conditions pulled from OpenWeatherMap and given user preferences.

Gear data ripped off from a flaky Runner's World page that tends to spontaneously disappear for periods of time.

There are quite a few similar and likely better tools out there. This is mostly just an excuse to re-familiarize myself with basic Rust syntax and concepts.

Usage

CLI tool

Run the following from the repo root:

cargo build --release -p wtw-running-cli
OWM_API_KEY=<OpenWeatherMap API key goes here> target/release/wtwr

You can optionally supply the OpenWeatherMap API key via a .env file by enabling the dotenv_key feature.

Alexa skill

This method requires targeting x86_64-unknown-linux-musl. See awslabs/aws-lambda-rust-runtime#17 for alternate methods (e.g. building inside a Docker container).

First install the musl toolchain:

sudo apt install musl musl-tools
rustup target add x86_64-unknown-linux-musl

Then run the following from the repo root to build the skill:

cd skill && ./build.sh

This generates a rust.zip file that can be used as a custom runtime for an AWS Lambda function.