git.iko.soy/typeable/pandoc
on master help sign in
EPUB Reader: Integrated into program
8460ea4Matthew Pickering
pandoc.cabal+4−2
@@ -231,7 +231,7 @@ Library
231 xml >= 1.3.12 && < 1.4,
231 xml >= 1.3.12 && < 1.4,
232 random >= 1 && < 1.1,
232 random >= 1 && < 1.1,
233 extensible-exceptions >= 0.1 && < 0.2,
233 extensible-exceptions >= 0.1 && < 0.2,
234− pandoc-types >= 1.12.3.3 && < 1.13,
234+ pandoc-types >= 1.12.3.4 && < 1.13,
235 aeson >= 0.7 && < 0.8,
235 aeson >= 0.7 && < 0.8,
236 tagsoup >= 0.13.1 && < 0.14,
236 tagsoup >= 0.13.1 && < 0.14,
237 base64-bytestring >= 0.1 && < 1.1,
237 base64-bytestring >= 0.1 && < 1.1,
@@ -248,7 +248,8 @@ Library
248 binary >= 0.5 && < 0.8,
248 binary >= 0.5 && < 0.8,
249 SHA >= 1.6 && < 1.7,
249 SHA >= 1.6 && < 1.7,
250 haddock-library >= 1.1 && < 1.2,
250 haddock-library >= 1.1 && < 1.2,
251− old-time
251+ old-time,
252+ deepseq-generics >= 0.1 && < 0.2
252 if flag(https)
253 if flag(https)
253 Build-Depends: http-client >= 0.3.2 && < 0.4,
254 Build-Depends: http-client >= 0.3.2 && < 0.4,
254 http-client-tls >= 0.2 && < 0.3,
255 http-client-tls >= 0.2 && < 0.3,
@@ -287,6 +288,7 @@ Library
287 Text.Pandoc.Readers.Native,
288 Text.Pandoc.Readers.Native,
288 Text.Pandoc.Readers.Haddock,
289 Text.Pandoc.Readers.Haddock,
289 Text.Pandoc.Readers.Docx,
290 Text.Pandoc.Readers.Docx,
291+ Text.Pandoc.Readers.EPUB,
290 Text.Pandoc.Writers.Native,
292 Text.Pandoc.Writers.Native,
291 Text.Pandoc.Writers.Docbook,
293 Text.Pandoc.Writers.Docbook,
292 Text.Pandoc.Writers.OPML,
294 Text.Pandoc.Writers.OPML,
pandoc.hs+1
@@ -891,6 +891,7 @@ defaultReaderName fallback (x:xs) =
891 ".json" -> "json"
891 ".json" -> "json"
892 ".docx" -> "docx"
892 ".docx" -> "docx"
893 ".t2t" -> "t2t"
893 ".t2t" -> "t2t"
894+ ".epub" -> "epub"
894 _ -> defaultReaderName fallback xs
895 _ -> defaultReaderName fallback xs
895
896
896-- Returns True if extension of first source is .lhs
897-- Returns True if extension of first source is .lhs
src/Text/Pandoc.hs+3
@@ -79,6 +79,7 @@ module Text.Pandoc
79 , readJSON
79 , readJSON
80 , readTxt2Tags
80 , readTxt2Tags
81 , readTxt2TagsNoMacros
81 , readTxt2TagsNoMacros
82+ , readEPUB
82 -- * Writers: converting /from/ Pandoc format
83 -- * Writers: converting /from/ Pandoc format
83 , Writer (..)
84 , Writer (..)
84 , writeNative
85 , writeNative
@@ -134,6 +135,7 @@ import Text.Pandoc.Readers.Native
134import Text.Pandoc.Readers.Haddock
135import Text.Pandoc.Readers.Haddock
135import Text.Pandoc.Readers.Docx
136import Text.Pandoc.Readers.Docx
136import Text.Pandoc.Readers.Txt2Tags
137import Text.Pandoc.Readers.Txt2Tags
138+import Text.Pandoc.Readers.EPUB
137import Text.Pandoc.Writers.Native
139import Text.Pandoc.Writers.Native
138import Text.Pandoc.Writers.Markdown
140import Text.Pandoc.Writers.Markdown
139import Text.Pandoc.Writers.RST
141import Text.Pandoc.Writers.RST
@@ -233,6 +235,7 @@ readers = [ ("native" , StringReader $ \_ s -> return $ readNative s)
233 ,("haddock" , mkStringReader readHaddock)
235 ,("haddock" , mkStringReader readHaddock)
234 ,("docx" , mkBSReader readDocx)
236 ,("docx" , mkBSReader readDocx)
235 ,("t2t" , mkStringReader readTxt2TagsNoMacros)
237 ,("t2t" , mkStringReader readTxt2TagsNoMacros)
238+ ,("epub" , mkBSReader readEPUB)
236 ]
239 ]
237
240
238data Writer = PureStringWriter (WriterOptions -> Pandoc -> String)
241data Writer = PureStringWriter (WriterOptions -> Pandoc -> String)