summaryrefslogtreecommitdiffhomepage
path: root/Monitors
diff options
context:
space:
mode:
Diffstat (limited to 'Monitors')
-rw-r--r--Monitors/Weather.hs19
1 files changed, 7 insertions, 12 deletions
diff --git a/Monitors/Weather.hs b/Monitors/Weather.hs
index d643bb0..2d957bd 100644
--- a/Monitors/Weather.hs
+++ b/Monitors/Weather.hs
@@ -102,20 +102,15 @@ parseData =
ss <- getAllBut "("
skipRestOfLine >> getAllBut "/"
(y,m,d,h) <- pTime
- skipRestOfLine >> string "Wind: "
- w <- manyTill anyChar $ newline
- manyTill skipRestOfLine $ string "Visibility: "
- v <- manyTill anyChar $ newline
- manyTill skipRestOfLine $ string "Sky conditions: "
- sk <- manyTill anyChar $ newline
- manyTill skipRestOfLine $ string "Temperature"
+ w <- getAfterString "Wind: "
+ v <- getAfterString "Visibility: "
+ sk <- getAfterString "Sky conditions: "
+ skipTillString "Temperature"
temp <- pTemp
- manyTill skipRestOfLine $ string "Dew Point: "
- dp <- manyTill anyChar $ newline
- manyTill skipRestOfLine $ string "Relative Humidity"
+ dp <- getAfterString "Dew Point: "
+ skipTillString "Relative Humidity"
rh <- pRh
- manyTill skipRestOfLine $ string "Pressure (altimeter): "
- p <- manyTill anyChar $ newline
+ p <- getAfterString "Pressure (altimeter): "
manyTill skipRestOfLine eof
return $ [WI st ss y m d h w v sk temp dp rh p]