From 97825882a0898f87290881c575abdb2c79b127a3 Mon Sep 17 00:00:00 2001
From: azfirefighter
Date: Thu, 14 Jan 2021 08:32:57 -0700
Subject: [PATCH] Had to hack the 7-day forcast b/c NWS hasn't updated St
David's forecast for over a week.
Added a notice to wildfire-prep.html about the SWCC not updating
the SW Sitrep until the PL > 1.
---
_includes/wildfire-prep.html | 2 +-
_layouts/default.html | 2 +-
config | 3 ++-
index.md | 2 +-
weather.sh | 7 ++++---
5 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/_includes/wildfire-prep.html b/_includes/wildfire-prep.html
index 80c5950..a9b088f 100644
--- a/_includes/wildfire-prep.html
+++ b/_includes/wildfire-prep.html
@@ -1 +1 @@
-
Click one for the appropriate situation report.
+

Click one for the appropriate situation report.
diff --git a/_layouts/default.html b/_layouts/default.html
index 4900361..aa64cc8 100644
--- a/_layouts/default.html
+++ b/_layouts/default.html
@@ -1,7 +1,7 @@
{% include header.html %}
{% include date.txt %}
WILDFIRE PREPAREDNESS LEVELS
{% include wildfire-prep.html %}
-SW Sitrep is NOT published by the SWCC until the PL > 1.
+SOUTHWEST AREA FIRE DANGER

diff --git a/config b/config
index 07062c6..77705df 100644
--- a/config
+++ b/config
@@ -8,5 +8,6 @@ url='https://www.lltodd.family/firewx'
email='weather-noreply@stdavidfire.com'
from='weather-noreply@www.lltodd.family'
office=TWC
-zipcode=85630
+#zipcode=85630
+location='"Benson, AZ"'
user=root
diff --git a/index.md b/index.md
index a96d057..b2907cb 100644
--- a/index.md
+++ b/index.md
@@ -5,6 +5,6 @@ github: azfirefighter
author: Jason Todd
license: LICENSE
logo: SDFD-trans.png
-title: Trial and Error
+title: SDFD Fire Weather Update
---
diff --git a/weather.sh b/weather.sh
index 1617326..af89c20 100755
--- a/weather.sh
+++ b/weather.sh
@@ -48,7 +48,7 @@ sed -n '1p' levels.txt > sw-level.txt
sed -n '2p' levels.txt > nat-level.txt
export sw=$(cat sw-level.txt)
export us=$(cat nat-level.txt)
-echo "
Click one for the appropriate situation report." > _includes/wildfire-prep.html
+echo "
Click one for the appropriate situation report." > _includes/wildfire-prep.html
rm level*.txt
rm SW_Wildfire_Prep.csv
##########################################################
@@ -81,7 +81,8 @@ mv wwa.txt _includes
# Remember to just create a LINK to this file hosted on the web since there can be SO much data.
##########################################################
# Get the 7 day forecast for St David and format it.
-$wxcast forecast $zipcode > 7dayfcast.txt
+#$wxcast forecast $location > 7dayfcast.txt
+$wxcast forecast "Benson, AZ" > 7dayfcast.txt # Quick hack
sed -i 's/No forecast found for location\: 85630 coordinates\: 31\.902220000000057\,\-110\.21934499999998/The NWS has no forecast available to download for Saint David\./' 7dayfcast.txt
sed -i 's/$/
/' 7dayfcast.txt
sed -i 's/Today/
Today<\/b>/' 7dayfcast.txt
@@ -126,7 +127,7 @@ mv 7dayfcast.txt _includes
# Get the full Fire Weather Forecast and split out the Discussion
$wxcast text $office FWF > fwf-raw.txt
sed -n '/.DISCUSSION.../,/^$/p' fwf-raw.txt > fwf-disc.txt
-sed -i 's/.DISCUSSION.../DISCUSSION: <\/b>
/' fwf-disc.txt
+sed -i '/.DISCUSSION.../d' fwf-disc.txt
sed -i 's/$/
/' fwf-disc.txt
mv fwf-disc.txt _includes
##########################################################