pandoc-3.6.3: Conversion between markup formats

Copyright | © 2022-2024 Albert Krewinkel
License | GPL-2.0-or-later
Maintainer | Albert Krewinkel <albert+pandoc@tarleb.com>
Safe Haskell | None
Language | Haskell2010

Text.Pandoc.Scripting

Description

Central data structure for scripting engines.

Synopsis

- data ScriptingEngine = ScriptingEngine {
  - engineName :: Text
  - engineApplyFilter :: forall (m :: Type -> Type). (PandocMonad m, MonadIO m) => Environment -> [String] -> FilePath -> Pandoc -> m Pandoc
  - engineLoadCustom :: forall (m :: Type -> Type). (PandocMonad m, MonadIO m) => FilePath -> m (CustomComponents m)
  }
- data CustomComponents (m :: Type -> Type) = CustomComponents {
  - customReader :: Maybe (Reader m)
  - customWriter :: Maybe (Writer m)
  - customTemplate :: Maybe Text
  - customExtensions :: Maybe ExtensionsConfig
  }
- noEngine :: ScriptingEngine

# Documentation

data ScriptingEngine #

Structure to define a scripting engine.

Constructors

ScriptingEngine |
Fields engineName :: Text Name of the engine. engineApplyFilter :: forall (m :: Type -> Type). (PandocMonad m, MonadIO m) => Environment -> [String] -> FilePath -> Pandoc -> m Pandoc Use the scripting engine to run a filter. engineLoadCustom :: forall (m :: Type -> Type). (PandocMonad m, MonadIO m) => FilePath -> m (CustomComponents m) Function to load a custom reader/writer from a script.

data CustomComponents (m :: Type -> Type) #

A component of a custom reader/writer: a custom reader, a custom writer, a template for a custom writer, or a specification of the extensions used by a script and their default values. Note that a single script can contain all of these.

Constructors

CustomComponents |
Fields customReader :: Maybe (Reader m) customWriter :: Maybe (Writer m) customTemplate :: Maybe Text customExtensions :: Maybe ExtensionsConfig

noEngine :: ScriptingEngine #