| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Follow.Types
Description
This module defines the types used in the whole application.
Synopsis
- data Recipe m = Recipe {
- rSubject :: Subject
- rSteps :: [Step m]
- rMiddlewares :: [Middleware]
- data Subject = Subject {}
- data Entry = Entry {}
- type Fetched m = m [Entry]
- type EntryGetter a = Entry -> Maybe a
- data Directory = Directory {}
- type Step m = (Fetched m, [Middleware])
- type Middleware = Directory -> Directory
- type Digester a = Directory -> a
Documentation
A recipe is a specification of a complete strategy to create the content to follow a subject.
Constructors
| Recipe | |
Fields
| |
Instances
| (MonadThrow m, MonadHttp m) => FromJSON (Recipe m) # | subject: # See |
Subject being followed. The whole idea of Follow is being able
to build strategies to gather URIs for the content published about any
subject.
Constructors
| Subject | |
An item of content that has been published somewhere.
Constructors
| Entry | |
Instances
| Eq Entry Source # | |
| Show Entry Source # | |
| FromJSON ComparisonFunction # | type: by_field
options:
field: title
|
Defined in Follow.Parser Methods parseJSON :: Value -> Parser ComparisonFunction # parseJSONList :: Value -> Parser [ComparisonFunction] # | |
| FromJSON Predicate # | type: equal
options:
field: title
value: Title
or type: less
options:
field: publish_date
value: 2018-08-08 00:00:00
or type: greater
options:
field: publish_date
value: 2018-08-08 00:00:00
or type: infix
options:
field: title
value: something
or type: prefix
options:
field: title
value: The
or type: suffix
options:
field: title
value: end
or type: not
options:
operator: # See or type: and
options:
operator1: # See or type: or
options:
operator1: # See |
| (MonadThrow m, MonadHttp m) => FromJSON (Fetched m) # | type: feed
options:
url: http://someurl.com
or type: webscraping
options:
url: http://someurl.com
selector: # See |
type EntryGetter a = Entry -> Maybe a Source #
Gathering of Item published for some Subject.
type Step m = (Fetched m, [Middleware]) Source #
A list of middlewares to be applied to some fetched entries.
type Middleware = Directory -> Directory Source #
Middleware does something to a directory.