diff options
author | Joris | 2018-06-17 23:24:47 +0200 |
---|---|---|
committer | Joris | 2018-06-18 11:13:55 +0200 |
commit | 0a4d3c8f12dc5797a919a00b6bcaf759947687cc (patch) | |
tree | bcb89781e22c2314bf0c064ebb37cb7f8a362f5c /src/Model | |
parent | e2a5c7c5c596d057b6fa9c08a8204ce1429cfdc4 (diff) |
Add ouest france parser
Diffstat (limited to 'src/Model')
-rw-r--r-- | src/Model/Ad.hs | 11 | ||||
-rw-r--r-- | src/Model/Detail.hs | 14 | ||||
-rw-r--r-- | src/Model/Mail.hs | 13 | ||||
-rw-r--r-- | src/Model/Resume.hs | 26 | ||||
-rw-r--r-- | src/Model/URL.hs | 7 |
5 files changed, 0 insertions, 71 deletions
diff --git a/src/Model/Ad.hs b/src/Model/Ad.hs deleted file mode 100644 index fe650a6..0000000 --- a/src/Model/Ad.hs +++ /dev/null @@ -1,11 +0,0 @@ -module Model.Ad - ( Ad(..) - ) where - -import Model.Resume -import Model.Detail - -data Ad = Ad - { resume :: Resume - , detail :: Detail - } deriving (Eq, Read, Show) diff --git a/src/Model/Detail.hs b/src/Model/Detail.hs deleted file mode 100644 index c0e8d5f..0000000 --- a/src/Model/Detail.hs +++ /dev/null @@ -1,14 +0,0 @@ -module Model.Detail - ( Detail(..) - ) where - -import Data.Text -import Data.Map (Map) - -import Model.URL - -data Detail = Detail - { description :: Maybe Text - , images :: [URL] - , properties :: Map Text Text - } deriving (Eq, Read, Show) diff --git a/src/Model/Mail.hs b/src/Model/Mail.hs deleted file mode 100644 index 7c75bbb..0000000 --- a/src/Model/Mail.hs +++ /dev/null @@ -1,13 +0,0 @@ -module Model.Mail - ( Mail(..) - ) where - -import Data.Text (Text) - -data Mail = Mail - { from :: Text - , to :: [Text] - , subject :: Text - , plainBody :: Text - , htmlBody :: Text - } deriving (Eq, Show) diff --git a/src/Model/Resume.hs b/src/Model/Resume.hs deleted file mode 100644 index 59f6698..0000000 --- a/src/Model/Resume.hs +++ /dev/null @@ -1,26 +0,0 @@ -module Model.Resume - ( Resume(..) - , getNewResumes - , getURLs - ) where - -import Data.List ((\\)) -import Data.Text (Text) - -import Model.URL (URL) - -data Resume = Resume - { name :: Text - , price :: Maybe Text - , url :: URL - , isPro :: Bool - } deriving (Eq, Read, Show) - -getNewResumes :: [URL] -> [Resume] -> ([URL], [Resume]) -getNewResumes viewdURLs resumes = - let newURLs = (getURLs resumes) \\ viewdURLs - newResumes = filter (\resume -> elem (url resume) newURLs) resumes - in (newURLs, newResumes) - -getURLs :: [Resume] -> [URL] -getURLs = map url diff --git a/src/Model/URL.hs b/src/Model/URL.hs deleted file mode 100644 index 2114113..0000000 --- a/src/Model/URL.hs +++ /dev/null @@ -1,7 +0,0 @@ -module Model.URL - ( URL - ) where - -import Data.Text - -type URL = Text |