wego-ascii-art-table

wego – ASCII weather app for the terminal

Last Updated on September 1, 2020

I spend an inordinate amount of time at the command line. I almost live on the command line because of its convenience. It’s probably because I love terminal apps.

wego is another gem of a terminal application. It’s open source weather software written in the Go programming language and designed for the terminal. It displays the weather in a variety of visually attractive ways. It’s a lightweight way to keep an eye on the weather without requiring a web browser. The information is SSL-encrypted for transmission to the local computer.

You may have been using the software without knowing it. wttr.in is a web frontend for wego that you can access using curl to provide weather information from a terminal. If you’ve already got curl on your system, there’s nothing to install. It’s got lots of options; you can find out about them from curl wttr.in/:help

While accessing the web service using curl is uber-cool, it suffers from a big drawback. The service is limited to 1 million requests a day. After that, they run out of their data source capacity. 1 million requests sounds a lot. But the service is pretty popular. And it always seems to be down when I want a weather forecast. So I’m using wego more and more.

There’s a bit of jiggery-pokery before you can use wego, but it’s website explains how to get up and running. My only addition is to note, if you don’t have Go installed, it’s probably easiest to install Go via snap, but I’m not a fan of snap — that’s just my personal opinion.

wego supports a flexible plugin system. It has two types of plugins: Backends (Data sources) and frontends.

wego can use three weather backends: forecast.io, Openweathermap, and Worldweatheronline. You need to create an account with at least one of these services. They give you a secret key that is supplied for API requests. It’s true that they limit the number of queries a day, but the limit is personal to you, unlike the aforementioned web service. A free account with  Dark Sky (forecast.io) allows 1,000 queries a day, which is sufficient for my needs.

The forecast.io backend only supports latitude, longitude pairs as location. The screenshot below was a query sent to Openweathermap, it’s backend is more flexible when it comes to location.

Let’s have a look at the software features.

The software has three frontends: ascii-art-table, emoji, and json. For the desktop user, the emoji frontend offers particularly attractive output. Here’s an example showing the forecast for the current day and the next couple of days for New York.

wego-weather-emoji

In the above screenshot the wego command is appended with -d 3. The -d flag (or -days) lets you set the number of days of weather forecast to be displayed. In fact, the default is 3. You can use the flag to show between 1 and 7 days.

The ascii-art table frontend offers more information.

wego-ascii-art-table

We now have the forecasted wind speed and its direction, as well as the amount of precipitation and its associated likelihood.

The software is configurable, you can change between metric and imperial units, display both the measured temperature and how it feels (taking into account the wind chill factor), as well as the viewing distance.

The final frontend is JSON. This is JavaScriptObject Notation, a lightweight language-independent data-interchange format. This format is designed for exporting the output to other services and programs. There’s the option not to indent the output.

The software has internationalization support via the supported backends.

wego stores it’s config file in ~/.wegorc. The default options can be overridden at the command line.

wego is a very handy utility for accessing weather information from the terminal. If you need a quick weather forecast and prefer to avoid web-based services, give it a whirl.

Website: github.com/schachmat/wego
Support:
Developer: Markus Teich
License: ISC License – functionally equivalent to the BSD 2-Clause and MIT licenses

wego is written in Go. Learn Go with our recommended free books and free tutorials.

Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Inline Feedbacks
View all comments