pandoc-2.17.0.1: Conversion between markup formats
CopyrightCopyright (C) 2006-2022 John MacFarlane
LicenseGNU GPL, version 2 or above
MaintainerJohn MacFarlane <jgm@berkeley@edu>
Stabilityalpha
Portabilityportable
Safe HaskellSafe-Inferred
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
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 #

Show Opt Source # 
Instance details

Defined in Text.Pandoc.App.Opt

Methods

showsPrec :: Int -> Opt -> ShowS #

show :: Opt -> String #

showList :: [Opt] -> ShowS #

FromJSON Opt Source # 
Instance details

Defined in Text.Pandoc.App.Opt

Methods

parseJSON :: Value -> Parser Opt

parseJSONList :: Value -> Parser [Opt]

ToJSON Opt Source # 
Instance details

Defined in Text.Pandoc.App.Opt

Methods

toJSON :: Opt -> Value

toEncoding :: Opt -> Encoding

toJSONList :: [Opt] -> Value

toEncodingList :: [Opt] -> Encoding

FromJSON (Opt -> Opt) Source # 
Instance details

Defined in Text.Pandoc.App.Opt

Methods

parseJSON :: Value -> Parser (Opt -> Opt)

parseJSONList :: Value -> 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
Generic LineEnding Source # 
Instance details

Defined in Text.Pandoc.App.Opt

Associated Types

type Rep LineEnding :: Type -> Type #

Show LineEnding Source # 
Instance details

Defined in Text.Pandoc.App.Opt

FromJSON LineEnding Source # 
Instance details

Defined in Text.Pandoc.App.Opt

Methods

parseJSON :: Value -> Parser LineEnding

parseJSONList :: Value -> Parser [LineEnding]

ToJSON LineEnding Source # 
Instance details

Defined in Text.Pandoc.App.Opt

Methods

toJSON :: LineEnding -> Value

toEncoding :: LineEnding -> Encoding

toJSONList :: [LineEnding] -> Value

toEncodingList :: [LineEnding] -> Encoding

type Rep LineEnding Source # 
Instance details

Defined in Text.Pandoc.App.Opt

type Rep LineEnding = D1 ('MetaData "LineEnding" "Text.Pandoc.App.Opt" "pandoc-2.17.0.1-inplace" '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
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-2.17.0.1-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)))

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) => Environment -> [Filter] -> [String] -> Pandoc -> m Pandoc Source #

Modify the given document using a filter.