aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorVidhu Kant Sharma <bokuwakanojogahoshii@yahoo.com>2020-11-30 18:08:22 +0530
committerVidhu Kant Sharma <bokuwakanojogahoshii@yahoo.com>2020-11-30 18:08:22 +0530
commite75bab87fc1638f5593b19c52a8f73ddcfdefdf2 (patch)
treef752fdfc30f0e8d2706e11eabd7f8453c728130b /scripts
parentbcadd3e7e7f8f8fb77eb4ee4817a7bf92cead858 (diff)
added a script that gets weather info every hour
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/mangasort2
-rwxr-xr-xscripts/runningminderbin7912 -> 0 bytes
-rwxr-xr-xscripts/weather12
3 files changed, 13 insertions, 1 deletions
diff --git a/scripts/mangasort b/scripts/mangasort
index 9bdf7435..e9f7b27e 100755
--- a/scripts/mangasort
+++ b/scripts/mangasort
@@ -3,7 +3,7 @@
import os
def sxivInput(r1, r2):
- return "sxiv " + r2 + " & " + "sxiv " + r1 + " & " # r2 comes before because the's how manga works
+ return "sxiv " + r1 + " & " + "sxiv " + r2 + " & "
def calculate(prefix, suffix, num):
r1 = ''
diff --git a/scripts/runningminder b/scripts/runningminder
deleted file mode 100755
index 98fc20e7..00000000
--- a/scripts/runningminder
+++ /dev/null
Binary files differ
diff --git a/scripts/weather b/scripts/weather
new file mode 100755
index 00000000..3fcab925
--- /dev/null
+++ b/scripts/weather
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+get_current_temp() {
+ temp=$(curl wttr.in | grep °C | awk 'NR==1 {print $9 "°C"}' | sed -r "s/\x1B\[(([0-9]+)(;[0-9]+)*)?[m,K,H,f,J]//g") # > /tmp/weather_temperature)
+ stat=$(curl wttr.in | awk 'NR==3 {print $1}')
+ echo $temp "("$stat")"
+}
+
+while :; do
+ echo $(get_current_temp) > /tmp/weather_stat
+ sleep 3600
+done