imm-1.4.0.0: Execute arbitrary actions for each unread element of RSS/Atom feeds

Safe HaskellNone
LanguageHaskell98

Imm.Hooks.WriteFile

Contents

Description

Implementation of Imm.Hooks that writes a file for each new RSS/Atom item.

Synopsis

Types

data FileInfo Source #

Where and what to write in a file

Constructors

FileInfo FilePath Builder 

Default behavior

defaultFilePath :: FilePath -> Feed -> FeedElement -> FilePath Source #

Generate a path roottitledate-title.html, where root is the first argument

defaultFileContent :: Feed -> FeedElement -> Builder Source #

Generate an HTML page, with a title, a header and an article that contains the feed element

Low-level helpers

defaultBody :: Feed -> FeedElement -> Html Source #

Generate the HTML content for a given feed element

convertDoc :: IsString t => Doc a -> t Source #