Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

chang parser to enumerator version, xournal-parser-0.4.1

  • Loading branch information...
commit 00f5cf328a0250373c213de496f6fbcf40956213 1 parent 7464b27
Ian-Woo Kim authored
3  CHANGES
View
@@ -1,3 +1,6 @@
0.1: 27 Dec 2011
* First public release. can generate svg files for each page and index.html file for nagivating those pages
+0.1.1: 17 Feb 2012
+ * switch parser to enumerator version (xournal-parser-0.4.1)
+
27 lib/Application/XournalConvert/Job.hs
View
@@ -4,21 +4,24 @@ module Application.XournalConvert.Job where
import System.Directory
import Data.Xournal.Simple
-import Text.Xournal.Parse
+-- import Text.Xournal.Parse
+import Text.Xournal.Parse.Enumerator
import Application.XournalConvert.Convert.MakeSVG
-
--- startJob :: IO ()
--- startJob = do
--- putStrLn "job started"
-
+-- |
startMakeSVG :: FilePath -> Maybe FilePath -> IO ()
startMakeSVG fname mdest = do
- xojcontent <- checkIfBinary fname >>= \b ->
- ifThenElse b (read_xojgz fname) (read_xournal fname)
- cdir <- getCurrentDirectory
- let dest = maybe cdir id mdest
- makeSVGFromXournal xojcontent fname dest
- return ()
+ exojcontent <- parseXournal fname
+ case exojcontent of
+ Left err -> putStrLn $ "parsing error : " ++ err
+ Right xojcontent -> do
+ cdir <- getCurrentDirectory
+ let dest = maybe cdir id mdest
+ makeSVGFromXournal xojcontent fname dest
+ return ()
+
+
+ -- xojcontent <- checkIfBinary fname >>= \b ->
+ -- ifThenElse b (read_xojgz fname) (read_xournal fname)
8 xournal-convert.cabal
View
@@ -1,5 +1,5 @@
Name: xournal-convert
-Version: 0.1.0.999
+Version: 0.1.1
Synopsis: convert utility for xoj files
Description: convert xoj files into various formats (SVG,SVG+index.html..)
Homepage: http://ianwookim.org/hxournal
@@ -39,9 +39,9 @@ Library
filepath == 1.2.*,
cmdargs >= 0.7 && < 0.10,
HStringTemplate == 0.6.*,
- xournal-types == 0.2.* || == 0.3.*,
- xournal-parser == 0.3.*,
- xournal-render == 0.4.* || == 0.5.*,
+ xournal-types == 0.4.*,
+ xournal-parser >= 0.4.1 && < 0.5,
+ xournal-render == 0.6.*,
cairo == 0.12.*,
bytestring == 0.9.*
Please sign in to comment.
Something went wrong with that request. Please try again.