[Moin-devel] Parsing wikimarkup from within a macro.
Brian Dorsey
brian at dorseys.org
Sat Jan 19 20:37:02 EST 2002
Hi everyone!
I've been working with some other people in the Seattle Python Users group to make a few actions & macros for MoinMoin. It's been great fun, and we've made someinteresting stuff so far.
It looks like a lot of the macros which come with MoinMoin are using macro.formatter.*method* to output little sections of html. It seems like it would be easier for us to output wiki markup and let MoinMoin code handle the rendering to html.
We poked around a bit and found something that works... but somehow it doesn't seem like we're using the objects the way they were ment to be used. Here is a sample:
from MoinMoin.parser.wiki import Parser
def execute(macro, args):
fakeForm = {}
text = " * Some wiki markup\n * some more"
return Parser(text).format(macro.formatter, fakeForm )
Is there a better way to do this?
Take care,
-Brian
More information about the Moin-devel
mailing list