Check weather from Terminal using wttr.in
wttr.in is a console-oriented weather forecast service that supports various information representation methods like terminal-oriented ANSI-sequences for console HTTP clients, HTML for web browsers, or PNG for graphical viewers.
Using wttr.in, we can get the weather data across the world with a single command.
Installation
Curl
sudo apt update
sudo apt upgrade
sudo apt-get install curl
Requirements
pip install requests
pip install geopy
pip install geoip2
pip install Flask
pip install gevent
2. Check weather of specific location
curl wttr.in/<Location-name>
Eg:
curl wttr.in/London
3. Check weather of an airport
curl wttr.in/<Airport-Code>
Eg:
curl wttr.in/cok
4. Check weather of a geographical location
curl wttr.in/~<Location name splitted by a + symbol>
Eg:
curl wttr.in/~Taj+Mahal
5. Check weather with IP address
curl wttr.in/@<Domain-name>
Eg:
curl wttr.in/@google.com
6. Check phase of the Moon
curl wttr.in/moon
If you would like to contribute to Hackzism you can also write an article and mail to hackzism.hack@gmail.com.
Your article will be published on our home page.
Comments
Post a Comment