follow-0.1.0.0: Haskell library to follow content published on any subject.

Safe HaskellNone
LanguageHaskell2010

Follow.Parser

Contents

Description

This module contains FromJSON instances in order to be able to parse Follow types up to a Recipe from a yaml or json text.

You can use decode functions in Data.Yaml in order to do the parsing.

For time fields, any format accepted by parseTimeGuess is accepted.

Orphan instances

FromJSON Middleware Source #
  type: decode
  options:
    encoding: # See Encoding instance
 

or

  type: sort
  options:
    function: # See ComparisonInstance instance
 

or

  type: filter
  options:
    operation: # See Predicate instance
 
Instance details

FromJSON Subject Source #
  title: Title
  description: Description
  tags: [tag_1, tag_2]
  
Instance details

FromJSON ComparisonFunction Source #
  type: by_field
  options:
    field: title
  
Instance details

FromJSON Predicate Source #
  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 Predicate instance
  

or

  type: and
  options:
    operator1: # See Predicate instance
    operator2: # See Predicate instance
  

or

  type: or
  options:
    operator1: # See Predicate instance
    operator2: # See Predicate instance
  
Instance details

FromJSON Encoding Source #

utf8, utf16le, utf16be, utf32le or utf32be

Instance details

FromJSON SelectorItem Source #
  type: text
  options:
    css: .selector
  

or

  type: attr
  options:
    css: .link
    name: href
  
Instance details

FromJSON Selector Source #
  uri: # See SelectorItem instance
  title: null
  description: null
  guid: null
  author: null
  publish_date: null
 
Instance details

(MonadThrow m, MonadHttp m) => FromJSON (Recipe m) Source #
  subject: # See Subject instance
  steps:
    -
      - # See Fetched instance
      -
        - # See Middleware instance
  middlewares:"
    - # See Middleware instance
 
Instance details

(MonadThrow m, MonadHttp m) => FromJSON (Fetched m) Source #
  type: feed
  options:
    url: http://someurl.com
  

or

  type: webscraping
  options:
    url: http://someurl.com
    selector: # See Selector instance
  
Instance details