aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2019-01-13 07:56:55 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2019-01-22 21:45:59 -0800
commit395ea03069167568f8fccb018c794bd43a787b94 (patch)
tree6b42b2f5daec10b5f5bc5e62b42efc88f7a1053b /src/Text/Pandoc/Writers.hs
parent5ddd7b121e1aea061b3e7b831dabbd13311929ff (diff)
downloadpandoc-395ea03069167568f8fccb018c794bd43a787b94.tar.gz
Support ipynb (Jupyter notebook) as input and output format.
[API change] * Depend on ipynb library. * Add `ipynb` as input and output format. * Added Text.Pandoc.Readers.Ipynb (supports both nbformat v3 and v4). * Added Text.Pandoc.Writers.Ipynb (supports nbformat v4). * Added ipynb readers and writers to T.P.Readers, T.P.Writers, and T.P.Extensions. Register the file extension .ipynb for this format. * Add `PandocIpynbDecodingError` constructor to Text.Pandoc.Error.Error. * Note: there is no template for ipynb.
Diffstat (limited to 'src/Text/Pandoc/Writers.hs')
-rw-r--r--src/Text/Pandoc/Writers.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Writers.hs b/src/Text/Pandoc/Writers.hs
index b61404238..2aca56147 100644
--- a/src/Text/Pandoc/Writers.hs
+++ b/src/Text/Pandoc/Writers.hs
@@ -49,6 +49,7 @@ module Text.Pandoc.Writers
, writeEPUB2
, writeEPUB3
, writeFB2
+ , writeIpynb
, writeHaddock
, writeHtml4
, writeHtml4String
@@ -101,6 +102,7 @@ import Text.Pandoc.Writers.Docx
import Text.Pandoc.Writers.DokuWiki
import Text.Pandoc.Writers.EPUB
import Text.Pandoc.Writers.FB2
+import Text.Pandoc.Writers.Ipynb
import Text.Pandoc.Writers.Haddock
import Text.Pandoc.Writers.HTML
import Text.Pandoc.Writers.ICML
@@ -140,6 +142,7 @@ writers = [
,("epub2" , ByteStringWriter writeEPUB2)
,("epub3" , ByteStringWriter writeEPUB3)
,("fb2" , TextWriter writeFB2)
+ ,("ipynb" , TextWriter writeIpynb)
,("html" , TextWriter writeHtml5String)
,("html4" , TextWriter writeHtml4String)
,("html5" , TextWriter writeHtml5String)