Updates to weather to make it much more powerful and accurate.

This commit is contained in:
Storm Dragon
2024-02-27 13:58:35 -05:00
parent 18f2b55179
commit f2d1fafc94
2 changed files with 8 additions and 2 deletions

View File

@ -356,6 +356,8 @@ if [ "$speakTime" == "true" ] ; then
fi
#Add temperature if zipcode is set
if [ -n "$zipcode" ] ; then
zipcode="${zipcode//[[:space:]]/+}"
zipcode="${zipcode#ip}"
temperature="$(curl -s "https://wttr.in/${zipcode}?format=%t%20degrees%20and%20%C")"
temp="${temperature//[^-[:digit:]]/}"
temperature="${temp} ${temperature#* }"