From 4ab6f2664599246fcc60d6573a2af0a2e392fe39 Mon Sep 17 00:00:00 2001 From: Markus Fleschutz Date: Sat, 5 Nov 2022 12:13:46 +0100 Subject: [PATCH] Update list-weather.ps1 --- Scripts/list-weather.ps1 | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Scripts/list-weather.ps1 b/Scripts/list-weather.ps1 index cdc7b60e..b16b1c5b 100755 --- a/Scripts/list-weather.ps1 +++ b/Scripts/list-weather.ps1 @@ -16,8 +16,7 @@ param([string]$Location = "") # empty means determine automatically try { - $Weather = (invoke-webRequest -uri http://wttr.in/${Location}?format=j1 -userAgent "curl" -useBasicParsing).Content | ConvertFrom-Json - + $Weather = (Invoke-WebRequest -URI http://wttr.in/${Location}?format=j1 -userAgent "curl" -useBasicParsing).Content | ConvertFrom-Json $Area = $Weather.nearest_area.areaName.value $Region = $Weather.nearest_area.region.value $Country = $Weather.nearest_area.country.value @@ -36,11 +35,11 @@ try { $Desc = $Hourly.weatherDesc.value if ($Hour -eq 0) { if ($Day -eq 0) { - write-host -foregroundColor green "🕗 🌡°C ☂️ 💧 💨 from ☀️UV ☁️ TODAY at $Area ($Region, $Country)" + write-host -foregroundColor green "TODAY 🌡°C ☂️ 💧 💨 from ☀️UV ☁️ at $Area ($Region, $Country)" } elseif ($Day -eq 1) { - write-host -foregroundColor green " TOMORROW" + write-host -foregroundColor green "TOMORROW" } else { - write-host -foregroundColor green " DAY AFTER TOMORROW" + write-host -foregroundColor green "DAY AFTER TOMORROW" } $Day++ }