= !MediaWiki language processor = == Description == Plugin introduces new wiki macro `mediawiki'. Macro turns trac wiki into pure mediawiki. It is based on [http://www.djangosnippets.org/snippets/139/ this] script. == Bugs/Feature Requests == Existing bugs and feature requests for MediaWikiPluginMacro are [report:9?COMPONENT=MediaWikiPluginMacro here]. If you have any issues, create a [http://trac-hacks.org/newticket?component=MediaWikiPluginMacro&owner=permon new ticket]. == Download == Download the zipped source from [download:mediawikipluginmacro here]. == Installation == {{{ unzip mediawikipluginmacro.zip cd mediawikipluginmacro ### next step (patch) only for python 2.3 python --version patch -p0 <<EOP diff -ruNb mediawiki.orig/parser.py mediawiki/parser.py --- mediawiki.orig/parser.py 2007-07-13 15:17:50.000000000 +0200 +++ mediawiki/parser.py 2008-04-25 11:00:59.000000000 +0200 @@ -5,7 +5,7 @@ """ import re, random, math, locale -from base64 import b64encode, b64decode +from base64 import decodestring from trac.core import * from trac.wiki.api import IWikiMacroProvider @@ -920,7 +920,10 @@ def slugify(text): """docstring for slugify""" - return u'/'.join(slugifyBit(t) for t in text.split(u'/')) + temp = [] + for t in text.split( u'/' ): + temp.append( slugifyBit( t ) ) + return u'/'.join( temp ) _linkPat = re.compile(ur'^([A-Za-z0-9\s]+:)?([A-Za-z0-9_\.\-\s\/]+)(?:\|([^\n]+?))?\]\](.*)$', re.UNICODE | re.DOTALL) def replaceInternalLinks(text): @@ -1329,8 +1332,8 @@ m = _templateSectionPat.search(headline) if m: istemplate = True - templatetitle = b64decode(m[0]) - templatesection = 1 + int(b64decode(m[1])) + templatetitle = decodestring(m[0]) + templatesection = 1 + int(decodestring(m[1])) headline = _templateSectionPat.sub(u'', headline) if toclevel: EOP python setup.py install }}} == Source == You can check out MediaWikiPluginMacro from [http://trac-hacks.org/svn/mediawikipluginmacro here] using Subversion, or [source:mediawikipluginmacro browse the source] with Trac. == Example == {{{ {{{ #!mediawiki = Heading = Everything here is interpreted by ''mediawiki'' processor. == List == # first ## first.a ## first.b [Wiki link] }}} }}} == Recent Changes == [[ChangeLog(mediawikipluginmacro, 3)]] == Author/Contributors == '''Author:''' [wiki:permon] [[BR]] '''Maintainer:''' [wiki:permon] [[BR]] '''Contributors:'''
E-mail address and name can be saved in the Preferences.