Add weather fetch via wttr.in. - annna - Annna the nice friendly bot.
HTML git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/annna/
DIR Log
DIR Files
DIR Refs
DIR Tags
DIR README
---
DIR commit 07ce9e9ec915b61bf7f3a00e6fe71335d55950fa
DIR parent 32fcf4d85d3eef8eda0608c91bb76bcc6992984f
HTML Author: eidolon <me@nou.meme>
Date: Sat, 26 Aug 2023 18:45:51 -0400
Add weather fetch via wttr.in.
Signed-off-by: Annna Robert-Houdin <annna@bitreich.org>
Diffstat:
A wetter | 9 +++++++++
1 file changed, 9 insertions(+), 0 deletions(-)
---
DIR diff --git a/wetter b/wetter
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+[ -z "$1" ] && {
+ printf 'usage: %s <location>\n' "${0##*/}" 2>&1
+ exit
+}
+
+location=$(printf %s "$1" | sed 's, ,\%20,g')
+curl -sfm 10 "https://wttr.in/$location?format=%C+%t\n"