Skip to content

tomz00/simple-weather-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Simple Weather App

A Very simple Weather App made in Linux scripting languague - Bash. This script is using OpenWeather API. The output is only Temperature, Humidity and Wind speed. You can tell it to be verbose and pass an arguments to return only what you want.

Setup

First install jq

sudo apt install jq -y

Install this script

wget https://raw.githubusercontent.com/tomz00/simple-weather-app/main/weather.sh

Make the file executable

chmod u+x

Lastly, add your API key to the "key" variable.

Usage

./weather.sh <city> - this will return current Temperature, Humidity and Wind speed in given city

Optional arguments:
  -t    Only print temperature
  -h    Only print humidity
  -w    Only print wind speed

Example

./weather.sh London - output will be: 7.2 °C 95% 3.09 m/s
./weather.sh London -v - output will be: Temperature: 7.2 °C Humidity: 95% Wind speed: 3.09 m/s
./weather.sh London,f -w -v - output will be: Wind speed: 5.75 mph

About

Simple Weather App

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages