pandoc-3.1.2: Conversion between markup formats
CopyrightCopyright (C) 2006-2023 John MacFarlane
LicenseGNU GPL, version 2 or above
MaintainerJohn MacFarlane <jgm@berkeley@edu>
Stabilityalpha
Portabilityportable
Safe HaskellSafe-Inferred
LanguageHaskell2010

Text.Pandoc.Filter

Description

Programmatically modifications of pandoc documents.

Synopsis

Documentation

data Filter Source #

Type of filter and path to filter file.

Instances

Instances details
Generic Filter Source # 
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 #

Show Filter Source # 
Instance details

Defined in Text.Pandoc.Filter

FromJSON Filter Source # 
Instance details

Defined in Text.Pandoc.Filter

Methods

parseJSON :: Value -> Parser Filter

parseJSONList :: Value -> Parser [Filter]

ToJSON Filter Source # 
Instance details

Defined in Text.Pandoc.Filter

Methods

toJSON :: Filter -> Value

toEncoding :: Filter -> Encoding

toJSONList :: [Filter] -> Value

toEncodingList :: [Filter] -> Encoding

type Rep Filter Source # 
Instance details

Defined in Text.Pandoc.Filter

type Rep Filter = D1 ('MetaData "Filter" "Text.Pandoc.Filter" "pandoc-3.1.2-inplace" '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 Source #

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

Instances

Instances details
Default Environment Source # 
Instance details

Defined in Text.Pandoc.Filter.Environment

Methods

def :: Environment #

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

Modify the given document using a filter.

applyJSONFilter :: MonadIO m => Environment -> [String] -> FilePath -> Pandoc -> m Pandoc Source #