Cleaned up Text.Pandoc. Added lots of documentation,

including an example program.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@691 788f1e2b-df1e-0410-8736-df70ead52e1b
This commit is contained in:
fiddlosopher
2007-07-12 08:32:57 +00:00
parent e962c76f05
commit bd5a5d48e7
+30 -5
View File
@@ -25,8 +25,25 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Stability : alpha
Portability : portable
This helper module exports the basic writers, readers, and definitions
from the Pandoc libraries.
This helper module exports the main writers, readers, and data
structure definitions from the Pandoc libraries.
A typical application will chain together a reader and a writer
to convert strings from one format to another. For example, the
following simple program will act as a filter converting markdown
fragments to reStructuredText, using reference-style links instead of
inline links:
> module Main where
> import Text.Pandoc
>
> markdownToRST :: String -> String
> markdownToRST = encodeUTF8 .
> (writeRST defaultWriterOptions {writerReferenceLinks = True}) .
> (readMarkdown defaultParserState) . decodeUTF8
>
> main = interact markdownToRST
-}
module Text.Pandoc
@@ -41,6 +58,11 @@ module Text.Pandoc
-- * Parser state used in readers
, ParserState (..)
, defaultParserState
, ParserContext (..)
, QuoteContext (..)
, KeyTable
, NoteTable
, HeaderType (..)
-- * Writers: converting /from/ Pandoc format
, writeMarkdown
, writeRST
@@ -48,6 +70,7 @@ module Text.Pandoc
, writeHtml
, writeHtmlString
, writeS5
, writeS5String
, writeDocbook
, writeMan
, writeRTF
@@ -55,9 +78,10 @@ module Text.Pandoc
-- * Writer options used in writers
, WriterOptions (..)
, defaultWriterOptions
-- * UTF-8 encoding and decoding
, encodeUTF8
, decodeUTF8
-- * Default headers for various output formats
, module Text.Pandoc.Writers.DefaultHeaders
-- * Functions for converting to and from UTF-8
, module Text.Pandoc.UTF8
) where
import Text.Pandoc.Definition
@@ -73,6 +97,7 @@ import Text.Pandoc.Writers.S5
import Text.Pandoc.Writers.Docbook
import Text.Pandoc.Writers.Man
import Text.Pandoc.Writers.RTF
import Text.Pandoc.Writers.DefaultHeaders
import Text.Pandoc.UTF8
import Text.Pandoc.Shared