You can get a terminal weather forecast for today from a finger request to 'graph.no'. If you don't have a 'finger' available, just use netcat.
The server uses the norweigian weather service to provide a forecast from anywhere in the world.
Here's a little script to get today's forecast. Just change the value of $CITY to whatever you want.
You can also run this in termux under android.
Code:
#!/bin/sh
#weather.sh
CITY="new york"
#finger ${CITY}@graph.no | sed '$d'
# if no finger client available, use nc
echo $CITY | nc graph.no 79 | sed -e '$ d'
The output looks like this.
Code:
$ ./weather
-= Meteogram for New York, United States =-
'C Rain (mm)
7
6 ^^^
5 ^^^
4 =--
3^^^ =--
2 ^^^--- =--
1 ---------
0 ---=--=--^^^===------------------
-1
-2
17 18 19 20 21 22 23 13/01 02 03 04 05 06 07_08_09_10_11_12_13_14 Hour
SW SW SW SW W W SW SW SW SW SW W W W SW SW SW SW SW SW S S Wind dir.
4 4 4 4 4 4 4 4 4 3 3 3 3 3 3 3 2 2 3 2 2 4 Wind(m/s)
Legend left axis: - Sunny ^ Scattered = Clouded =V= Thunder # Fog
Legend right axis: | Rain ! Sleet * Snow
There's a website here:
https://graph.no/finger/
If you
$echo help | nc graph.no 79
you get a list of various things you can query from the server.
Code:
$ echo help | nc graph.no 79
Weather via finger, graph.no
* Code: https://github.com/ways/fingr/
* https://nominatim.org/ is used for location lookup.
* https://www.yr.no/ is used for weather data.
* Hosted by Copyleft Solutions AS: https://copyleft.no/
* Contact: finger@falkp.no
Usage:
finger oslo@graph.no
Using coordinates:
finger 59.1,10.1@graph.no
Using imperial units:
finger ^oslo@graph.no
Using the Beaufort wind scale:
finger £oslo@graph.no
Ask for wider output, longer forecast (~<screen width>):
finger oslo~200@graph.no
Specify another location when names conflict:
finger "oslo, united states"@graph.no
Display "wind chill" / "feels like" temperature:
finger ¤oslo@graph.no
No graph, just a one-line forecast (needs improvement):
finger o:oslo@graph.no
Hammering will get you blacklisted. Remember the data doesn't change more than once an hour.
News:
* Launched in 2012
* 2021-05: total rewrite due to API changes. Much better location searching, proper hour-by-hour for most of the world.
Trying some different cities this evening, some return "internal server error", for example, 'sydney'. So maybe there are some bugs.