Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- runPandocA :: (MonadAction m, MonadThrow m) => PandocIO a -> m a
- data PandocActionException = PandocActionException String
- readMDFile :: (MonadAction m, MonadThrow m) => ReaderOptions -> Path Rel File -> m Pandoc
- readMDFileIn :: (MonadAction m, MonadThrow m) => ReaderOptions -> Path Rel Dir -> Path Rel File -> m Pandoc
- readMDFileWithin :: (MonadAction m, MonadThrow m) => ReaderOptions -> Within Rel (Path Rel File) -> m Pandoc
- needPandocImagesIn :: (MonadAction m, MonadThrow m) => Path Rel Dir -> Pandoc -> m ()
- makePDFLaTeX :: (MonadAction m, MonadThrow m) => WriterOptions -> Pandoc -> m ByteString
- progressivelyDemoteHeaders :: Cofree [] Pandoc -> Cofree [] Pandoc
- replaceUnusableImages :: MonadThrow m => [String] -> (Text -> Inline) -> Pandoc -> m Pandoc
- prefixAllImages :: Path Rel Dir -> Pandoc -> Pandoc
- flattenMeta :: MonadAction m => (Pandoc -> PandocIO Text) -> Meta -> m Value
Documentation
runPandocA :: (MonadAction m, MonadThrow m) => PandocIO a -> m a Source #
Natural transformation from PandocIO
to a MonadAction
data PandocActionException Source #
Instances
Eq PandocActionException Source # | |
Defined in Shakebook.Pandoc (==) :: PandocActionException -> PandocActionException -> Bool # (/=) :: PandocActionException -> PandocActionException -> Bool # | |
Show PandocActionException Source # | |
Defined in Shakebook.Pandoc showsPrec :: Int -> PandocActionException -> ShowS # show :: PandocActionException -> String # showList :: [PandocActionException] -> ShowS # | |
Exception PandocActionException Source # | |
Defined in Shakebook.Pandoc |
readMDFile :: (MonadAction m, MonadThrow m) => ReaderOptions -> Path Rel File -> m Pandoc Source #
Read a markdown file as an Action.
readMDFileIn :: (MonadAction m, MonadThrow m) => ReaderOptions -> Path Rel Dir -> Path Rel File -> m Pandoc Source #
Read a markdown file as an Action.
readMDFileWithin :: (MonadAction m, MonadThrow m) => ReaderOptions -> Within Rel (Path Rel File) -> m Pandoc Source #
Like readMDFile
but accepts a Within
needPandocImagesIn :: (MonadAction m, MonadThrow m) => Path Rel Dir -> Pandoc -> m () Source #
makePDFLaTeX :: (MonadAction m, MonadThrow m) => WriterOptions -> Pandoc -> m ByteString Source #
Make a pdflatex in an Action
.
progressivelyDemoteHeaders :: Cofree [] Pandoc -> Cofree [] Pandoc Source #
Precarious function that demotes Header numbers within the Pandoc according to its depth in the Cofree. This is so that Headers that H1s that would correctly display for an HTML page will be lower in the table of contents in the PDF equivalent.
replaceUnusableImages :: MonadThrow m => [String] -> (Text -> Inline) -> Pandoc -> m Pandoc Source #
For a list of file extensions, replace the images with an Inline based on its src path.
flattenMeta :: MonadAction m => (Pandoc -> PandocIO Text) -> Meta -> m Value Source #