Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/codehex/bbcweather
Retrieves the current and forecasted weather from the BBC Weather APIs
https://github.com/codehex/bbcweather
api bbc bbc-weather-api weather
Last synced: 7 days ago
JSON representation
Retrieves the current and forecasted weather from the BBC Weather APIs
- Host: GitHub
- URL: https://github.com/codehex/bbcweather
- Owner: CodeHex
- License: mit
- Created: 2022-07-26T15:20:44.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-08-14T17:27:26.000Z (over 2 years ago)
- Last Synced: 2024-12-06T19:31:10.563Z (27 days ago)
- Topics: api, bbc, bbc-weather-api, weather
- Language: Go
- Homepage:
- Size: 42 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# BBC Weather API tools
[![Go Reference](https://pkg.go.dev/badge/github.com/codehex/bbcweather.svg)](https://pkg.go.dev/github.com/codehex/bbcweather)Retrieves the current and forecasted weather from the BBC Weather APIs
# wx
`wx` is a command line tool for displaying the current weather from your nearest observation station and the forecasted weather for the next 14 days. Uses the BBC weather APIs for the source of information.
```zsh
go install github.com/codehex/bbcweather/cmd/wx@latest
```
Locations can be in the form of
- The name of the location, city or region
- The first part of the post code
- Longitude and latitude
- The location ID (see [Geonames](https://www.geonames.org/) dataset for more details on location IDs, data dump is [here](http://download.geonames.org/export/dump/))
e.g.```shell
wx Edinburgh Airport # By specific location
wx New York # By city or town
wx Lake District # By region
wx Switzerland # By country
wx SW19 # By postcode (e.g. Wimbeldon)
wx 48.8566,2.3522 # By longitude and latitude (e.g. Paris)
wx 2993458 # By location ID (e.g. Monaco - https://www.geonames.org/2993458)
```A preset location can be used by setting the `WX_QUERY` env variable
```zsh
export WX_QUERY=Paris
wx
```
Here's an example of a weather report