In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly shows you "how to use wego to check the weather under Linux", the content is easy to understand, clear, hope to help you solve doubts, the following let the editor lead you to study and learn "how to use wego to check the weather under Linux" this article.
You can use wego,wego to view the weather in the Linux system. The terminal weather client is written in Go language.
Install wego under Linux
Installing wego is fairly simple. Wego is written in Go, and the first step is to install the Go language. Then install wego.
$go get github.com/schachmat/wego
Wego will be installed to, so add GOPATH/bin to the $PATH environment variable.
$echo'export PATH= "$PATH:$GOPATH/bin" > ~ / .bashrc$ source ~ / .bashrc
Now you can start wego directly from the command line.
$wego
The first time you run weg, you will generate a configuration file (~ / .wegorc), and you need to specify a weather API key. You can get a free API key from worldweatheronline.com. Register and use it free of charge. You only need to provide a valid email address.
Browse the weather forecast under the Linux command line and browse the weather forecast under the Linux command line
Your .wegorc configuration file looks like this:
Browse the weather forecast under the Linux command line and browse the weather forecast under the Linux command line
In addition to API key, you can also configure the place you want to query the weather, the name of the city / country you use, and the language in ~ / .wegorc. Note that the use of API in this weather is limited: up to 5 queries per second and up to 250 queries per day. When you re-execute the wego command, you will see the latest weather forecast (your designated place, of course), as shown in the picture.
The weather information displayed includes: (1) temperature, (2) wind speed and direction, (3) visual distance, and (4) precipitation and precipitation probability display a 3-day weather forecast by default. If you want to modify it, you can change the weather range (up to 5 days) with parameters, such as to view the weather forecast for 5 days:
$wego 5
If you want to check the weather in another place, just provide the name of the city:
$wego Seattle
Problem solving
You may encounter the following error: user:Currentnot implemented on linux/amd64
This error occurs when you run wego in an environment that does not support native Go compilers. In this case you only need to use gccgo, a compiler front end of Go, to compile the program. This can be done with the following command.
$sudoyum install gcc-go$ go get-compiler=gccgo github.com/schachmat/wego
The above is all the contents of the article "how to use wego to check the Weather under Linux". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.