I looked for the same thing when I started to use DokuWiki. Somehow I thought that if I was able to figure out how to parse and render WikiText, I would feel better about recovering my data in case of a major disaster with DokuWiki. I thought if can extract the code and I would be able to automate it and then to dump my DokuWiki to hmtl. Some strange, paranoid reasoning, really ...
Anyhow, in the attached php-script I collected all the bits of code which I found to be required to render a page. Well almost: (a) pictures are not displayed correctly, (b) the script runs in the DokuWiki-directory and some of the included and required files will include and require still other files and functions, (c) there is not style sheet to "nicen" the output ... but maybe this "single threat of code" will be able to guide someone to do the impossible.