Format conversion: Difference between revisions

adds pandoc example to mediawiki
moves pandoc to the top of the list
Line 75: Line 75:


==Wiki formats==
==Wiki formats==


=== Mediawiki DTD ===
=== Mediawiki DTD ===
http://meta.wikimedia.org/wiki/Wikipedia_DTD
http://meta.wikimedia.org/wiki/Wikipedia_DTD
=== pandoc ===
[http://code.google.com/p/pandoc/ Pandoc] is a Haskell library for converting from one markup format to another, and a command-line tool that uses this library. It can read markdown and (subsets of) reStructuredText, HTML, and LaTeX, and it can write markdown, reStructuredText, HTML, LaTeX, ConTeXt, Docbook XML, OpenDocument XML, GNU Texinfo, RTF, ODT, MediaWiki markup, groff man pages, and [[Presentation|S5 HTML slide shows]].
Or more simply, Pandoc rocks the free world!  Because Pandoc does MediaWiki format, we used it in the [[Html2Wiki]] extension.
To convert an HTML document to MediaWiki syntax, you can simply issue a command like
<source lang="bash">
pandoc --from html --to mediawiki foo.html --output foo.wiki.txt
</source>


=== Wiki To PDF ===
=== Wiki To PDF ===
Line 116: Line 126:


The OpenOffice Writer has an export filter that allows you to author in OpenOffice and then save your document in wiki format.
The OpenOffice Writer has an export filter that allows you to author in OpenOffice and then save your document in wiki format.
==== [http://code.google.com/p/pandoc/ pandoc - Google Code] ====
Pandoc is a Haskell library for converting from one markup format to another, and a command-line tool that uses this library. It can read markdown and (subsets of) reStructuredText, HTML, and LaTeX, and it can write markdown, reStructuredText, HTML, LaTeX, ConTeXt, Docbook XML, OpenDocument XML, GNU Texinfo, RTF, ODT, MediaWiki markup, groff man pages, and [[Presentation|S5 HTML slide shows]].
Or more simply, Pandoc rocks the free world!
To convert an HTML document to MediaWiki syntax, you can simply issue a command like
<source lang="bash">
pandoc --from html --to mediawiki foo.html --output foo.wiki.txt
</source>


== Other ==
== Other ==