CLI to extract meteorology data from Open Meteo. https://crates.io/crates/open-meteo-cli
Go to file
midefos e481e5c44a
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Actualizar 'README.md'
2023-06-13 18:48:32 +02:00
src Cargo fmt 2023-06-13 18:41:14 +02:00
.gitignore First commit, CLI to request the current weather from Open Meteo 2023-05-19 00:03:14 +02:00
.woodpecker.yml Adding woodpecker.yml file 2023-06-13 18:44:56 +02:00
Cargo.lock Updating cargo libs 2023-06-08 23:11:09 +02:00
Cargo.toml Adding SpeedUnit and TempUnit 2023-06-08 23:10:21 +02:00
README.md Actualizar 'README.md' 2023-06-13 18:48:32 +02:00

Open Meteo CLI

Status

CLI to extract meteorology data from Open Meteo.

Usage

Current Weather

Displays the current weather for your IP address automatically or for specific coordinates.

open-meteo-cli current-weather [FLAGS] [OPTIONS]

Options

  • -l, --latitude <LATITUDE>: Latitude as a decimal number.
  • -L, --longitude <LONGITUDE>: Longitude as a decimal number.
  • --temperature-unit <temperature-unit>: Switches between Celsius or Fahrenheit. Default value is Celsius.
  • --speed-unit <speed-unit>: Switches between km/h, m/s, mp/h or knots. Default value is Kmh.

Flags

  • -a, --all: Displays all the information.
  • -d, --is-day: Displays if it's day or night.
  • -t, --temperature: Displays the decimal temperature.
  • -w, --windspeed: Displays the decimal wind speed.
  • -W, --winddirection: Displays the wind direction.
  • --coords: Displays the latitude and the longitude.
  • --city: Displays the city.
  • -c, --clean: Cleans the output and only displays the values separated by commas.
    • The order of values is as follows: latitude, longitude, city, is_day, temperature, windspeed, winddirection.

Examples

  • Standard usage: open-meteo-cli current-weather -a
      ┌──────────────────────────────────────────────────┐
      │                                                  │
      │      === Current weather for Zaragoza ===        │
      │      Night                                       │
      │      Temperature: 18.8°C                         │
      │      Wind speed: 6.6 km/h                        │
      │      Wind direction: 22°                         │
      │      Latitude: 41.6405, Longitude: -0.8814       │
      │      === Weather data by Open-Meteo.com ===      │
      │                                                  │
      └──────────────────────────────────────────────────┘
  • Using coordinates: open-meteo-cli current-weather -l 12.2 -L=-0.38 -t -w
      ┌──────────────────────────────────────────────────┐
      │                                                  │
      │      === Current weather ===                     │
      │      Temperature: 32.6°C                         │
      │      Wind speed: 12.5 km/h                       │
      │      === Weather data by Open-Meteo.com ===      │
      │                                                  │
      └──────────────────────────────────────────────────┘
  • Clean: open-meteo-cli current-weather -d -t -w -c
0,18.8,6.6

Attribution

The weather data used in this application is provided by Open-Meteo.com under the CC BY 4.0 license. We would like to express our gratitude to Open-Meteo.com for their contribution to this project.