@@ -25,8 +25,25 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 Stability : alpha
25 Stability : alpha
26 Portability : portable
26 Portability : portable
28−This helper module exports the basic writers, readers, and definitions
28+This helper module exports the main writers, readers, and data
29−from the Pandoc libraries.
29+structure definitions from the Pandoc libraries.
31+A typical application will chain together a reader and a writer
32+to convert strings from one format to another. For example, the
33+following simple program will act as a filter converting markdown
34+fragments to reStructuredText, using reference-style links instead of
40+> markdownToRST :: String -> String
41+> markdownToRST = encodeUTF8 .
42+> (writeRST defaultWriterOptions {writerReferenceLinks = True}) .
43+> (readMarkdown defaultParserState) . decodeUTF8
45+> main = interact markdownToRST
32module Text.Pandoc
49module Text.Pandoc
@@ -41,6 +58,11 @@ module Text.Pandoc
41 -- * Parser state used in readers
58 -- * Parser state used in readers
42 , ParserState (..)
59 , ParserState (..)
43 , defaultParserState
60 , defaultParserState
44 -- * Writers: converting /from/ Pandoc format
66 -- * Writers: converting /from/ Pandoc format
45 , writeMarkdown
67 , writeMarkdown
46 , writeRST
68 , writeRST
@@ -48,6 +70,7 @@ module Text.Pandoc
48 , writeHtml
70 , writeHtml
49 , writeHtmlString
71 , writeHtmlString
51 , writeDocbook
74 , writeDocbook
52 , writeMan
75 , writeMan
53 , writeRTF
76 , writeRTF
@@ -55,9 +78,10 @@ module Text.Pandoc
55 -- * Writer options used in writers
78 -- * Writer options used in writers
56 , WriterOptions (..)
79 , WriterOptions (..)
57 , defaultWriterOptions
80 , defaultWriterOptions
58− -- * UTF-8 encoding and decoding
81+ -- * Default headers for various output formats
59− , encodeUTF8
82+ , module Text.Pandoc.Writers.DefaultHeaders
60− , decodeUTF8
83+ -- * Functions for converting to and from UTF-8
84+ , module Text.Pandoc.UTF8
63import Text.Pandoc.Definition
87import Text.Pandoc.Definition
@@ -73,6 +97,7 @@ import Text.Pandoc.Writers.S5
73import Text.Pandoc.Writers.Docbook
97import Text.Pandoc.Writers.Docbook
74import Text.Pandoc.Writers.Man
98import Text.Pandoc.Writers.Man
75import Text.Pandoc.Writers.RTF
99import Text.Pandoc.Writers.RTF
100+import Text.Pandoc.Writers.DefaultHeaders
76import Text.Pandoc.UTF8
101import Text.Pandoc.UTF8
77import Text.Pandoc.Shared
102import Text.Pandoc.Shared