Adding automatic IP address, some refactor and better texts. Upgrading version.
This commit is contained in:
59
README.md
59
README.md
@@ -4,14 +4,12 @@ CLI to extract meteorology data from Open Meteo.
|
||||
|
||||
## Usage
|
||||
|
||||
The Open Meteo CLI allows you to retrieve weather data for specific coordinates.
|
||||
|
||||
### Current Weather
|
||||
|
||||
Get the current weather for a given coordinate.
|
||||
Displays the current weather for your IP address automatically or for specific coordinates.
|
||||
|
||||
```
|
||||
open-meteo current-weather [OPTIONS] --latitude <LATITUDE> --longitude <LONGITUDE>
|
||||
open-meteo-cli current-weather [OPTIONS] --latitude <LATITUDE> --longitude <LONGITUDE>
|
||||
```
|
||||
|
||||
#### Options
|
||||
@@ -19,30 +17,51 @@ open-meteo current-weather [OPTIONS] --latitude <LATITUDE> --longitude <LONGITUD
|
||||
- `-L, --longitude <LONGITUDE>`: Longitude as a decimal number.
|
||||
|
||||
#### Flags
|
||||
- `-a, --all`: Prints all available parameters.
|
||||
- `-d, --is-day`: Prints if it is day or night.
|
||||
- `-t, --temperature`: Prints the decimal temperature.
|
||||
- `-w, --windspeed`: Prints the decimal wind speed.
|
||||
- `-W, --winddirection`: Prints the wind direction angle.
|
||||
- `-c, --clean`: Cleans the output and only shows the values separated by commas.
|
||||
- The order of values is as follows: is_day, temperature, windspeed, winddirection.
|
||||
- `-a, --all`: Displays all the information.
|
||||
- `-d, --is-day`: Displays if it's day or night.
|
||||
- `-t, --temperature`: Displays the decimal temperature, in Celsius.
|
||||
- `-w, --windspeed`: Displays the decimal wind speed, in km/h.
|
||||
- `-W, --winddirection`: Displays the wind direction, in degrees.
|
||||
- `--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 -l 5 -L 5 -a`
|
||||
|
||||
- Standard usage: `open-meteo-cli current-weather -a`
|
||||
|
||||
```
|
||||
=== Current weather for Latitude: 5, Longitude: 5 ===
|
||||
Night
|
||||
Temperature: 28.4°C
|
||||
Wind speed: 17.0 km/h
|
||||
Wind direction: 212.0°
|
||||
=== Weather data by Open-Meteo.com ===
|
||||
┌──────────────────────────────────────────────────┐
|
||||
│ │
|
||||
│ === 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 === │
|
||||
│ │
|
||||
└──────────────────────────────────────────────────┘
|
||||
```
|
||||
|
||||
- Clean: `open-meteo-cli current-weather -l 12 -L=-3.4 -d -t -w -c`
|
||||
- Using coordinates: `open-meteo-cli current-weather -l 12.2 -L=-0.38 -t -w`
|
||||
|
||||
```
|
||||
0,26.5,15.5
|
||||
┌──────────────────────────────────────────────────┐
|
||||
│ │
|
||||
│ === 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
|
||||
|
||||
Reference in New Issue
Block a user