{-# LANGUAGE OverloadedStrings #-} module Main where import FeedMonad import Data.Category import Data.URL (URL(..), _URL) import Database (FeedId(..)) import Middleware import qualified Data.Set as S import Data.Entry import Data.List.Lens (prefixed) import Control.Lens myFeeds :: [ Category FeedId ] myFeeds = [ Category "News" [Leaf (FeedId (URL "https://github.com/feediron/feediron-recipes/commits/master.atom"))] ] myFilters :: Middleware myFilters = modifyScore (has (tags . ix (Tag "github"))) (+10) . modifyScore (has (tags . ix (Tag "haskell"))) (+20) . modifyTags (has (url . _URL . prefixed "tag:github.com")) (S.insert (Tag "github")) main :: IO () main = do defaultMain defaultConfig{feeds = myFeeds, filters = myFilters }