diff options
| author | John MacFarlane <[email protected]> | 2022-10-31 09:59:36 -0700 |
|---|---|---|
| committer | John MacFarlane <[email protected]> | 2022-10-31 11:29:23 -0700 |
| commit | 4a47ffb8ba5f67b5e0e430aa65252a67838a0a92 (patch) | |
| tree | 35746986f597d59b2ecde73df801fc92905ef7d7 /src/Text/Pandoc/App.hs | |
| parent | 3e48d9701d955dc1df27f9cfd2eb5111b2cd9c1f (diff) | |
Text.Pandoc.App: Change `parseOptionsFromArgs` and `parseOptions`...optinfo
They now return `Either OptInfo Opt`.
Add `OptInfo` type.
Add `handleOptInfo` function. This performs the IO actions for
things like `--version` that were previously done in `parseOptionsFromArgs`.
An argument for a `ScriptingEngine` has been added, to facilitate
printing custom templates and custom extensions for Lua filters.
(However, at this stage nothing is yet done with it.)
[API change]
Diffstat (limited to 'src/Text/Pandoc/App.hs')
| -rw-r--r-- | src/Text/Pandoc/App.hs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Text/Pandoc/App.hs b/src/Text/Pandoc/App.hs index c5fe382c8..a87fece66 100644 --- a/src/Text/Pandoc/App.hs +++ b/src/Text/Pandoc/App.hs @@ -14,7 +14,9 @@ Does a pandoc conversion based on command-line options. -} module Text.Pandoc.App ( convertWithOpts + , handleOptInfo , Opt(..) + , OptInfo(..) , LineEnding(..) , IpynbOutput (..) , Filter(..) @@ -48,9 +50,9 @@ import Text.Pandoc.MediaBag (mediaItems) import Text.Pandoc.Image (svgToPng) import Text.Pandoc.App.FormatHeuristics (formatFromFilePaths) import Text.Pandoc.App.Opt (Opt (..), LineEnding (..), defaultOpts, - IpynbOutput (..)) + IpynbOutput (..), OptInfo(..)) import Text.Pandoc.App.CommandLineOptions (parseOptions, parseOptionsFromArgs, - options) + options, handleOptInfo) import Text.Pandoc.App.Input (InputParameters (..), readInput) import Text.Pandoc.App.OutputSettings (OutputSettings (..), optToOutputSettings) import Text.Collate.Lang (Lang (..), parseLang) |
