From 8c90b3439dd8776576c48619eebead5ced675214 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sun, 1 Nov 2020 12:59:22 +0100 Subject: [PATCH 1/2] Fix weather module --- modules/weather | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/weather b/modules/weather index 42887b7..5782f53 100755 --- a/modules/weather +++ b/modules/weather @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/local/bin/bash # Deps: # curl @@ -6,10 +6,10 @@ get_weather() { - curl -s v2.wttr.in | grep -e "Weather" | sed 's/C,.*/C/g; s/+//g; s/.*\[0m.//g; s/.//2' + curl -s v2.wttr.in | grep -e "Weather" | sed -n 2p | sed s/Weather://g | sed 's/,//g' | sed 's/+//g' | sed 's/°C.*/°C/' | sed 's/.*m//' } -if [ $(( 10#$(date +'%S') % 30 )) -eq 0 ]; then +if [ $(( 10#$(date '+%S') % 30 )) -eq 0 ]; then get_weather fi From 00f5b44f5f54667f44e22ccf9893d1563c8cd827 Mon Sep 17 00:00:00 2001 From: Baitinq <30861839+Baitinq@users.noreply.github.com> Date: Sun, 1 Nov 2020 12:00:56 +0000 Subject: [PATCH 2/2] Update weather --- modules/weather | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/weather b/modules/weather index 5782f53..9bd9f52 100755 --- a/modules/weather +++ b/modules/weather @@ -1,4 +1,4 @@ -#!/usr/local/bin/bash +#!/bin/bash # Deps: # curl