If you use (or used to use) a Confluence wiki, you may need to deliver content that was written in wiki markup to HTML. Confluence does have the ability to export an entire space to HTML, but not a single page (or section of a page). To overcome this limitation, I’ve written a script called
confluence2html which can convert a subset of Confluence’s wiki markup to HTML. (You can check it out at my Github page – For examples of the supported subset of wiki syntax, see the
Unfortunately, the new versions of Confluence use a hacky “not-quite-XML” storage format that is terrible for writers and for which there are basically no existing XML tools either. If you are trying to get your content out of a newer version of Confluence and back into wiki markup, check out Graham Hannington’s site (search the page for “wikifier”). His page also has tools to help you wrangle the new format, if you care to (I don’t).
With a bit of editing, you should be able to get the output of Graham’s tool to conform to the subset of Confluence wiki markup supported by this script. It supports some common macros (including tables!), and I’ve found it really useful.
Right now, it’s a command line tool only. You can use it like so:
$ confluence2html < wiki-input.txt > html-output.html
If you don’t know how to run commands from the shell, you can read about it at LinuxCommand.org. If you are on Windows, you can run shell commands using Cygwin. If you’re on a Mac, open Utilities > Terminal in Finder.
At this point I’ll quit blathering and point you to the Github page. Again: for examples of the supported subset of wiki syntax, see the
t/files directory. For documentation on the supported wiki syntax, see the