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

Text.Pandoc.App

Description

Does a pandoc conversion based on command-line options.

Synopsis

Documentation

data Opt Source #

Data structure for command line options.

Constructors

Opt 

Fields

Instances

Instances details
Show Opt Source # 
Instance details

Defined in Text.Pandoc.App.Opt

Methods

showsPrec :: Int -> Opt -> ShowS #

show :: Opt -> String #

showList :: [Opt] -> ShowS #

Generic Opt Source # 
Instance details

Defined in Text.Pandoc.App.Opt

Associated Types

type Rep Opt :: Type -> Type #

Methods

from :: Opt -> Rep Opt x #

to :: Rep Opt x -> Opt #

ToJSON Opt Source # 
Instance details

Defined in Text.Pandoc.App.Opt

FromJSON Opt Source # 
Instance details

Defined in Text.Pandoc.App.Opt

FromYAML (Opt -> Opt) Source # 
Instance details

Defined in Text.Pandoc.App.Opt

Methods

parseYAML :: Node Pos -> Parser (Opt -> Opt) #

type Rep Opt Source # 
Instance details

Defined in Text.Pandoc.App.Opt

type Rep Opt

data LineEnding Source #

The type of line-endings to be used when writing plain-text.

Constructors

LF 
CRLF 
Native 

Instances

Instances details
Show LineEnding Source # 
Instance details

Defined in Text.Pandoc.App.Opt

Generic LineEnding Source # 
Instance details

Defined in Text.Pandoc.App.Opt

Associated Types

type Rep LineEnding :: Type -> Type #

FromYAML LineEnding Source # 
Instance details

Defined in Text.Pandoc.App.Opt

ToJSON LineEnding Source # 
Instance details

Defined in Text.Pandoc.App.Opt

FromJSON LineEnding Source # 
Instance details

Defined in Text.Pandoc.App.Opt

type Rep LineEnding Source # 
Instance details

Defined in Text.Pandoc.App.Opt

type Rep LineEnding = D1 ('MetaData "LineEnding" "Text.Pandoc.App.Opt" "pandoc-2.15-GMYMsJ56IjjI1siSqfjpiA" 'False) (C1 ('MetaCons "LF" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "CRLF" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Native" 'PrefixI 'False) (U1 :: Type -> Type)))

data Filter Source #

Type of filter and path to filter file.

Instances

Instances details
Show Filter Source # 
Instance details

Defined in Text.Pandoc.Filter

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 #

FromYAML Filter Source # 
Instance details

Defined in Text.Pandoc.Filter

ToJSON Filter Source # 
Instance details

Defined in Text.Pandoc.Filter

FromJSON Filter Source # 
Instance details

Defined in Text.Pandoc.Filter

type Rep Filter Source # 
Instance details

Defined in Text.Pandoc.Filter

type Rep Filter = D1 ('MetaData "Filter" "Text.Pandoc.Filter" "pandoc-2.15-GMYMsJ56IjjI1siSqfjpiA" '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)))

defaultOpts :: Opt Source #

Defaults for command-line options.

options :: [OptDescr (Opt -> IO Opt)] Source #

A list of functions, each transforming the options data structure in response to a command-line option.

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

Modify the given document using a filter.