2018-03-18 18:46:28 +01:00
|
|
|
{-# LANGUAGE NoImplicitPrelude #-}
|
2006-12-20 07:50:14 +01:00
|
|
|
{- |
|
|
|
|
Module : Main
|
2018-01-05 20:19:47 +01:00
|
|
|
Copyright : Copyright (C) 2006-2018 John MacFarlane
|
2008-08-10 19:33:20 +02:00
|
|
|
License : GNU GPL, version 2 or above
|
2006-12-20 07:50:14 +01:00
|
|
|
|
2007-07-08 00:51:55 +02:00
|
|
|
Maintainer : John MacFarlane <jgm@berkeley@edu>
|
2008-08-10 19:33:20 +02:00
|
|
|
Stability : alpha
|
2006-12-20 07:50:14 +01:00
|
|
|
Portability : portable
|
|
|
|
|
|
|
|
Parses command-line options and calls the appropriate readers and
|
|
|
|
writers.
|
|
|
|
-}
|
2006-10-17 16:22:29 +02:00
|
|
|
module Main where
|
2018-03-18 18:46:28 +01:00
|
|
|
import Prelude
|
2017-04-02 23:02:55 +02:00
|
|
|
import qualified Control.Exception as E
|
2017-06-01 15:09:38 +02:00
|
|
|
import Text.Pandoc.App (convertWithOpts, defaultOpts, options, parseOptions)
|
2017-10-28 05:39:20 +02:00
|
|
|
import Text.Pandoc.Error (handleError)
|
2015-02-18 20:57:30 +01:00
|
|
|
|
2016-12-10 12:36:09 +01:00
|
|
|
main :: IO ()
|
2017-04-02 23:02:55 +02:00
|
|
|
main = E.catch (parseOptions options defaultOpts >>= convertWithOpts)
|
2017-10-28 05:58:54 +02:00
|
|
|
(handleError . Left)
|