pandoc-2.17.1.1: Conversion between markup formats

Copyright | Copyright (C) 2006-2022 John MacFarlane
License | GNU GPL, version 2 or above
Maintainer | John MacFarlane <jgm@berkeley@edu>
Stability | alpha
Portability | portable
Safe Haskell | None
Language | Haskell2010

Text.Pandoc.Filter

Description

Programmatically modifications of pandoc documents.

Synopsis

- data Filter
  - = LuaFilter FilePath
  - | JSONFilter FilePath
  - | CiteprocFilter
- data Environment = Environment {
  - envReaderOptions :: ReaderOptions
  - envWriterOptions :: WriterOptions
  }
- applyFilters :: (PandocMonad m, MonadIO m) => Environment -> [Filter] -> [String] -> Pandoc -> m Pandoc

# Documentation

data Filter #

Type of filter and path to filter file.

Constructors

LuaFilter FilePath |
JSONFilter FilePath |
CiteprocFilter |

#### Instances

Instances details

Show Filter # |
Instance details Defined in Text.Pandoc.Filter Methods showsPrec :: Int -> Filter -> ShowS # show :: Filter -> String # showList :: [Filter] -> ShowS #
Generic Filter # |
Instance details Defined in Text.Pandoc.Filter Associated Types type Rep Filter :: Type -> Type # Methods from :: Filter -> Rep Filter x # to :: Rep Filter x -> Filter #
ToJSON Filter # |
Instance details Defined in Text.Pandoc.Filter Methods toJSON :: Filter -> Value # toEncoding :: Filter -> Encoding # toJSONList :: [Filter] -> Value # toEncodingList :: [Filter] -> Encoding #
FromJSON Filter # |
Instance details Defined in Text.Pandoc.Filter Methods parseJSON :: Value -> Parser Filter # parseJSONList :: Value -> Parser [Filter] #
type Rep Filter # |
Instance details Defined in Text.Pandoc.Filter type Rep Filter = D1 ('MetaData "Filter" "Text.Pandoc.Filter" "pandoc-2.17.1.1-DKf6lIxlr03v7sFr349kZ" 'False) (C1 ('MetaCons "LuaFilter" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FilePath)) :+: (C1 ('MetaCons "JSONFilter" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FilePath)) :+: C1 ('MetaCons "CiteprocFilter" 'PrefixI 'False) (U1 :: Type -> Type)))

data Environment #

Environment in which a filter is run. This includes reader and writer options.

Constructors

Environment |
Fields envReaderOptions :: ReaderOptions envWriterOptions :: WriterOptions

#### Instances

Instances details

Default Environment # |
Instance details Defined in Text.Pandoc.Filter.Environment Methods def :: Environment #

applyFilters :: (PandocMonad m, MonadIO m) => Environment -> [Filter] -> [String] -> Pandoc -> m Pandoc #

Modify the given document using a filter.