pandoc.hs 272 Bytes
Newer Older
Henrik Tramberend's avatar
Henrik Tramberend committed
1 2 3 4 5 6 7 8 9 10
module Pandoc (pandoc) where

import Text.Pandoc
import Control.Exception

pandoc :: WriterOptions -> FilePath -> FilePath -> IO ()
pandoc options inPath outPath = do
  pandoc <- readFile inPath >>= readMarkdown def
  writeHtmlString options pandoc >>= writeFile outPath