Add docx export
This commit is contained in:
+3
-2
@@ -4,7 +4,7 @@
|
||||
module Main (main) where
|
||||
|
||||
import Docster.Types (DocsterError(..))
|
||||
import Docster.Compiler (compileToPDF, compileToHTML)
|
||||
import Docster.Compiler (compileToPDF, compileToHTML, compileToDOCX)
|
||||
import System.Environment (getArgs)
|
||||
import Control.Exception (throwIO)
|
||||
|
||||
@@ -12,7 +12,8 @@ import Control.Exception (throwIO)
|
||||
parseArgs :: [String] -> Either DocsterError (IO ())
|
||||
parseArgs ["-pdf", path] = Right (compileToPDF path)
|
||||
parseArgs ["-html", path] = Right (compileToHTML path)
|
||||
parseArgs _ = Left $ InvalidUsage "Usage: docster -pdf|-html <file.md>"
|
||||
parseArgs ["-docx", path] = Right (compileToDOCX path)
|
||||
parseArgs _ = Left $ InvalidUsage "Usage: docster -pdf|-html|-docx <file.md>"
|
||||
|
||||
-- | Main entry point - parse arguments and execute appropriate action
|
||||
main :: IO ()
|
||||
|
||||
Reference in New Issue
Block a user