aboutsummaryrefslogtreecommitdiff
path: root/modules/weather
diff options
context:
space:
mode:
authorManuel Palenzuela <manuelpalenzuelamerino@gmail.com>2019-10-21 19:34:53 +0100
committerManuel Palenzuela <manuelpalenzuelamerino@gmail.com>2019-10-21 19:34:53 +0100
commit08e1dfabba1d05a23e4a1f11bc7b42f65f1a319b (patch)
tree66b41a149107490152bd244b3a6eca40964a2b8b /modules/weather
parent7026bc81aa89be2c6b998f39e258366b32c18cb0 (diff)
Added weather module
Diffstat (limited to 'modules/weather')
-rw-r--r--modules/weather8
1 files changed, 7 insertions, 1 deletions
diff --git a/modules/weather b/modules/weather
index 188e431..21706bc 100644
--- a/modules/weather
+++ b/modules/weather
@@ -4,7 +4,13 @@
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"
UNITS="Metric"
API_KEY="756edce7e9d4c385ef9499a53492678c"