2006-12-20 21:54:23 +01:00
|
|
|
{-
|
2017-10-27 07:57:13 +02:00
|
|
|
Copyright (C) 2006-2017 John MacFarlane <jgm@berkeley.edu>
|
2006-12-20 21:54:23 +01:00
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
-}
|
|
|
|
|
2006-12-20 07:50:14 +01:00
|
|
|
{- |
|
|
|
|
Module : Main
|
2017-10-27 07:57:13 +02:00
|
|
|
Copyright : Copyright (C) 2006-2017 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
|
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)
|