|
Packit |
dda32d |
{-
|
|
Packit |
dda32d |
Copyright (C) 2006-2017 John MacFarlane <jgm@berkeley.edu>
|
|
Packit |
dda32d |
|
|
Packit |
dda32d |
This program is free software; you can redistribute it and/or modify
|
|
Packit |
dda32d |
it under the terms of the GNU General Public License as published by
|
|
Packit |
dda32d |
the Free Software Foundation; either version 2 of the License, or
|
|
Packit |
dda32d |
(at your option) any later version.
|
|
Packit |
dda32d |
|
|
Packit |
dda32d |
This program is distributed in the hope that it will be useful,
|
|
Packit |
dda32d |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
dda32d |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
Packit |
dda32d |
GNU General Public License for more details.
|
|
Packit |
dda32d |
|
|
Packit |
dda32d |
You should have received a copy of the GNU General Public License
|
|
Packit |
dda32d |
along with this program; if not, write to the Free Software
|
|
Packit |
dda32d |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
Packit |
dda32d |
-}
|
|
Packit |
dda32d |
|
|
Packit |
dda32d |
{- |
|
|
Packit |
dda32d |
Module : Main
|
|
Packit |
dda32d |
Copyright : Copyright (C) 2006-2017 John MacFarlane
|
|
Packit |
dda32d |
License : GNU GPL, version 2 or above
|
|
Packit |
dda32d |
|
|
Packit |
dda32d |
Maintainer : John MacFarlane <jgm@berkeley@edu>
|
|
Packit |
dda32d |
Stability : alpha
|
|
Packit |
dda32d |
Portability : portable
|
|
Packit |
dda32d |
|
|
Packit |
dda32d |
Parses command-line options and calls the appropriate readers and
|
|
Packit |
dda32d |
writers.
|
|
Packit |
dda32d |
-}
|
|
Packit |
dda32d |
module Main where
|
|
Packit |
dda32d |
import qualified Control.Exception as E
|
|
Packit |
dda32d |
import Text.Pandoc.App (convertWithOpts, defaultOpts, options, parseOptions)
|
|
Packit |
dda32d |
import Text.Pandoc.Error (handleError)
|
|
Packit |
dda32d |
|
|
Packit |
dda32d |
main :: IO ()
|
|
Packit |
dda32d |
main = E.catch (parseOptions options defaultOpts >>= convertWithOpts)
|
|
Packit |
dda32d |
(handleError . Left)
|