Added weather module

This commit is contained in:
Manuel Palenzuela 2019-10-21 19:34:53 +01:00
parent 7026bc81aa
commit 08e1dfabba

View file

@ -4,7 +4,13 @@
get_weather() get_weather()
{ {
LOCATION=$(geolocate) LOCATION=$(curl -s http://ip-api.com/json | \
jq '.lat, .lon' | \
while read -r LATITUDE; do
read -r LONGITUDE
echo "${LATITUDE}:${LONGITUDE}" | tr -d '"'
done)
LANG="en" LANG="en"
UNITS="Metric" UNITS="Metric"
API_KEY="756edce7e9d4c385ef9499a53492678c" API_KEY="756edce7e9d4c385ef9499a53492678c"