port du jour: ansiweather

En cherchant dans les ports de OpenBSD pour un programme affichant les prévisions météo pkg_info -Q weather j’ai trouvé ansiweather:

ansiweather is a shell script for displaying the current weather conditions in a terminal, with support for ANSI colors and Unicode symbols.

# pkg_add ansiweather
$ ansiweather -l Montreal,CA -u metric -s true -d true 
Weather in Montreal => 1 °C ☁ - UVI => 5.02 - Wind => 4.1 m/s
NW - Humidity => 77% - Pressure => 1005 hPa - Sunrise => May 
09 04:30:29 AM - Sunset => May 09 07:11:07 PM 

Capture en couleur du terminal:

Pour les prévisions sur 5 jours:

$ ansiweather -l Montreal,CA -u metric -s true -f 5 -d true
Montreal forecast => Sat May 09: 6/1 °C ☁ - Sun May 10: 11/1 
°C ☁ - Mon May 11: 12/2 °C ☀ - Tue May 12: 9/-1 °C ☔ - Wed 
May 13: 13/2 °C ☁ 

À l’avenir je n’aurai plus besoin de mon téléphone intelligent ou la page internet surchargée de Météomédia. J’ai créé les alias suivant dans ~/.kshrc:

alias meteo='ansiweather -l Montreal,CA -u metric -d true'
alias prev='ansiweather -l Montreal,CA -u metric -s true -f 5 -d true'