summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--index.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/index.php b/index.php
index c0bf12d..9835fdd 100644
--- a/index.php
+++ b/index.php
@@ -17,9 +17,10 @@ $arr_json = json_decode($json, true);
// Try to OCR the current temperature from Jersey Met's usually-more-up-to-date image...
if (!exec('tesseract "https://sojpublicdata.blob.core.windows.net/jerseymet/Town/internet.Temperature1.png" stdout | grep -Eo "[-0-9]+\.[0-9]+°C"', $ocroutput, $ocrretval)) {
+ // ...if not, use the JSON output
$curtemp = $arr_json['currentTemprature'];
} else {
- // ...if not, use the JSON output
+ // ...if so, use the OCRed output
$curtemp = $ocroutput[0];
}