From: Stephan D. <ste...@gm...> - 2002-10-21 14:26:39
|
On Monday 21 October 2002 15:52, you wrote: > Hi, > > Stephan Diehl hat gesagt: // Stephan Diehl wrote: > > What irks me every time I'm looking a some Wiki is the fact that everyone > > is using a different markup (besides the WikiWords of course). Maybe it's > > time to let the author decide what markup he wants to use and provide > > different wiki dialect plugins. > > This is a great idea, but probably needs to be part of a greater > project. I think, I'll have a look at the OriginalWiki-Markup (from > c2.com) and make PyDiddy compatible to a least this one. > > Or to StructuredText??? > I think it wouldn't be too difficult. The wiki texts would need some marker, maybe something like Content: text/wiki on the first line. Then just dispatch to the right parser class for the dialect. The difficult thing is probably to agree on an interface for the parser (or better html translator) :-) It might be enough to have the following interface: class MyWikiParser: def __init__(self,wikitext,wikiNameReplacementPrefix): doSomething def getHtml(self): doSomething; return htmlText I had already a quick look at StructuredText. It seems to be extreamly heavyweight and slow (but it's much more flexible than you can possibly image). Stephan |