Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/snus-kin/weather-wrapper
A bash wrapper for wttr.in
https://github.com/snus-kin/weather-wrapper
city displays-weather-forecast forecast moon moon-phase weather wrapper wttr
Last synced: about 2 months ago
JSON representation
A bash wrapper for wttr.in
- Host: GitHub
- URL: https://github.com/snus-kin/weather-wrapper
- Owner: snus-kin
- License: gpl-3.0
- Created: 2016-12-28T19:28:29.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2019-01-22T13:10:00.000Z (almost 6 years ago)
- Last Synced: 2024-08-13T03:07:17.100Z (5 months ago)
- Topics: city, displays-weather-forecast, forecast, moon, moon-phase, weather, wrapper, wttr
- Language: Shell
- Size: 32.2 KB
- Stars: 6
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# weather-wrapper
A bash wrapper for wttr.in.# Usage
A bash wrapper for wttr.in.
Displays weather forecast for a location, or the current phase of the moon.
Options:
-0, --today: Display today's quadripartite weather forecast
-1, --tomorrow: Display tomorrow's
-2, --nextday: Display the next day's
-3, --three: Three-day quad
-c, --city CITY: Specify the location city as CITY, e.g. -c Berlin
-m, --moon: Show the moon phase (location agnostic)
Without any options, display today's simple forecast for your default location# Why a Wrapper?
Firstly, if you're looking for a self-hosted all singing all dancing program that does this: is a good option, however it requires go and an api key, this program is more portable, only requiring curl.
(for moon phase output use )Also, before this I had never programmed anything in bash so it was a bit of a challenge.
# TODO
- [x] read defaults from config file including default city
- [ ] expand to work with more options
- [x] make only one curl request when combining -0, -1, -2
- [ ] weather and moon should probably be permitted together, outputs concatenated