| Copyright | Copyright (C) 2006-2021 John MacFarlane | 
|---|---|
| License | GNU GPL, version 2 or above | 
| Maintainer | John MacFarlane <jgm@berkeley@edu> | 
| Stability | alpha | 
| Portability | portable | 
| Safe Haskell | None | 
| Language | Haskell2010 | 
Text.Pandoc.App
Description
Does a pandoc conversion based on command-line options.
Synopsis
- convertWithOpts :: Opt -> IO ()
 - data Opt = Opt {
- optTabStop :: Int
 - optPreserveTabs :: Bool
 - optStandalone :: Bool
 - optFrom :: Maybe Text
 - optTo :: Maybe Text
 - optTableOfContents :: Bool
 - optShiftHeadingLevelBy :: Int
 - optTemplate :: Maybe FilePath
 - optVariables :: Context Text
 - optMetadata :: Meta
 - optMetadataFiles :: [FilePath]
 - optOutputFile :: Maybe FilePath
 - optInputFiles :: Maybe [FilePath]
 - optNumberSections :: Bool
 - optNumberOffset :: [Int]
 - optSectionDivs :: Bool
 - optIncremental :: Bool
 - optSelfContained :: Bool
 - optHtmlQTags :: Bool
 - optHighlightStyle :: Maybe Text
 - optSyntaxDefinitions :: [FilePath]
 - optTopLevelDivision :: TopLevelDivision
 - optHTMLMathMethod :: HTMLMathMethod
 - optAbbreviations :: Maybe FilePath
 - optReferenceDoc :: Maybe FilePath
 - optEpubSubdirectory :: String
 - optEpubMetadata :: Maybe FilePath
 - optEpubFonts :: [FilePath]
 - optEpubChapterLevel :: Int
 - optEpubCoverImage :: Maybe FilePath
 - optTOCDepth :: Int
 - optDumpArgs :: Bool
 - optIgnoreArgs :: Bool
 - optVerbosity :: Verbosity
 - optTrace :: Bool
 - optLogFile :: Maybe FilePath
 - optFailIfWarnings :: Bool
 - optReferenceLinks :: Bool
 - optReferenceLocation :: ReferenceLocation
 - optDpi :: Int
 - optWrap :: WrapOption
 - optColumns :: Int
 - optFilters :: [Filter]
 - optEmailObfuscation :: ObfuscationMethod
 - optIdentifierPrefix :: Text
 - optStripEmptyParagraphs :: Bool
 - optIndentedCodeClasses :: [Text]
 - optDataDir :: Maybe FilePath
 - optCiteMethod :: CiteMethod
 - optListings :: Bool
 - optPdfEngine :: Maybe String
 - optPdfEngineOpts :: [String]
 - optSlideLevel :: Maybe Int
 - optSetextHeaders :: Bool
 - optAscii :: Bool
 - optDefaultImageExtension :: Text
 - optExtractMedia :: Maybe FilePath
 - optTrackChanges :: TrackChanges
 - optFileScope :: Bool
 - optTitlePrefix :: Maybe Text
 - optCss :: [FilePath]
 - optIpynbOutput :: IpynbOutput
 - optIncludeBeforeBody :: [FilePath]
 - optIncludeAfterBody :: [FilePath]
 - optIncludeInHeader :: [FilePath]
 - optResourcePath :: [FilePath]
 - optRequestHeaders :: [(Text, Text)]
 - optNoCheckCertificate :: Bool
 - optEol :: LineEnding
 - optStripComments :: Bool
 - optCSL :: Maybe FilePath
 - optBibliography :: [FilePath]
 - optCitationAbbreviations :: Maybe FilePath
 - optSandbox :: Bool
 
 - data LineEnding
 - data Filter
 - defaultOpts :: Opt
 - parseOptions :: [OptDescr (Opt -> IO Opt)] -> Opt -> IO Opt
 - parseOptionsFromArgs :: [OptDescr (Opt -> IO Opt)] -> Opt -> String -> [String] -> IO Opt
 - options :: [OptDescr (Opt -> IO Opt)]
 - applyFilters :: (PandocMonad m, MonadIO m) => ReaderOptions -> [Filter] -> [String] -> Pandoc -> m Pandoc
 
Documentation
convertWithOpts :: Opt -> IO () Source #
Data structure for command line options.
Constructors
| Opt | |
Fields 
  | |
data LineEnding Source #
The type of line-endings to be used when writing plain-text.
Instances
| Show LineEnding Source # | |
Defined in Text.Pandoc.App.Opt Methods showsPrec :: Int -> LineEnding -> ShowS # show :: LineEnding -> String # showList :: [LineEnding] -> ShowS #  | |
| Generic LineEnding Source # | |
Defined in Text.Pandoc.App.Opt Associated Types type Rep LineEnding :: Type -> Type #  | |
| FromYAML LineEnding Source # | |
Defined in Text.Pandoc.App.Opt  | |
| ToJSON LineEnding Source # | |
Defined in Text.Pandoc.App.Opt Methods toJSON :: LineEnding -> Value # toEncoding :: LineEnding -> Encoding # toJSONList :: [LineEnding] -> Value # toEncodingList :: [LineEnding] -> Encoding #  | |
| FromJSON LineEnding Source # | |
Defined in Text.Pandoc.App.Opt  | |
| type Rep LineEnding Source # | |
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)))  | |
Type of filter and path to filter file.
Constructors
| LuaFilter FilePath | |
| JSONFilter FilePath | 
Instances
| Show Filter Source # | |
| Generic Filter Source # | |
| FromYAML Filter Source # | |
| ToJSON Filter Source # | |
Defined in Text.Pandoc.Filter  | |
| FromJSON Filter Source # | |
| type Rep Filter Source # | |
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.