Text/Plain formatter is pretty broken

My Wiki acts mainly as documentation for my program. I wanted to export the Wiki's contents as doc/*.txt into the program's tarball so they could easily be read with standard UNIX tools such as less. Unfortunately the text_plain.py included with MoinMoin created pretty unusable output. This is pretty much a complete rewrite, which fixes/changes at least the following:

I'm not a real Python programmer, so the code might be stupid in places. I'm including the whole file instead of the patch because pretty much the whole file was changed.

I updated this code to work with MoinMoin 1.8.2. A couple of issues though:

Minor update for 1.9.2. Added a diff since ReimarBauer asked for it, although I doubt it's all too helpful. :) Would be nice to get this included some day. You can see examples of generated pages from http://www.dovecot.org/tmp/wiki-export.tar.gz

I've beautified the the patch text_plain.py.patch (pep8 (0.5.0) is happy) and did a few small code cleanups. There are currently tow known problems:

Hi Pascal, it is almost pretty good, thx.

Can you please have a look at the smiley table. Do you have an idea how to fix that. Also some tables are too complex for the current solution. And please clean up this page, may be move the old patches to an "old" page. An example how to call it <<Action(format,"formats to text/plain", mimetype=text/plain)>> besides adding url parameters. -- ReimarBauer 2010-04-25 11:46:14

Moved old patches to /OldPatches -- PascalVolk 2010-05-03 08:50:45

beautified patch implemented in 1.9 -- ReimarBauer 2010-05-03 22:13:07


CategoryFeaturePatched

MoinMoin: FeatureRequests/TextPlainFormatterRewrite (last edited 2010-05-03 22:13:08 by ReimarBauer)