diff options
-rw-r--r-- | README.md | 4 | ||||
-rw-r--r-- | src/AdListener.hs | 1 | ||||
-rw-r--r-- | src/Config.hs | 5 | ||||
-rw-r--r-- | src/Model/Config.hs | 1 |
4 files changed, 3 insertions, 8 deletions
@@ -33,8 +33,8 @@ url = http://www.leboncoin.fr/locations/offres/ile_de_france/?f=a&th=1 # The properties field is an optional list # properties = cp, city, surface, ges -# The waitInMinutes field is an optional integer, default to 1 -# waitInMinutes = 60 +# The waitDurationInMinutes field is an optional integer, default to 1 +# waitDurationInMinutes = 60 ``` Email diff --git a/src/AdListener.hs b/src/AdListener.hs index eee2de4..a52e188 100644 --- a/src/AdListener.hs +++ b/src/AdListener.hs @@ -8,6 +8,7 @@ import Data.List (intersperse) import Data.Text (Text) import qualified Data.Text as T import qualified Data.Text.IO as T +import Data.Time.Clock (getCurrentTime, diffUTCTime, UTCTime) import Control.Concurrent (threadDelay) diff --git a/src/Config.hs b/src/Config.hs index e4b2bc6..39ff185 100644 --- a/src/Config.hs +++ b/src/Config.hs @@ -36,7 +36,6 @@ configUsage = , " - url (required)" , " - mailTo (optional)" , " - properties (optional)" - , " - waitInMinutes (optional, default to 1)" , "" , " Example:" , "" @@ -50,9 +49,6 @@ configUsage = , "" , " # The properties field is an optional list" , " # properties = cp, city, surface, ges" - , "" - , " # The waitInMinutes field is an optional integer, default to 1" - , " # waitInMinutes = 60" ] configPath :: FilePath @@ -86,7 +82,6 @@ configFromMap map = do { url = url , mailTo = fieldValues "mailTo" map , properties = fieldValues "properties" map - , waitInMinutes = fromMaybe 1 $ M.lookup "waitInMinutes" map >>= fmap fst . eitherToMaybe . decimal } return config diff --git a/src/Model/Config.hs b/src/Model/Config.hs index 8fb05b9..42b390e 100644 --- a/src/Model/Config.hs +++ b/src/Model/Config.hs @@ -10,5 +10,4 @@ data Config = Config { url :: URL , mailTo :: [Text] , properties :: [Text] - , waitInMinutes :: Int } deriving (Eq, Read, Show) |