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