February 19, 2008
Discovering DekiScript
BrigetteK @ 3:24 pm
I have been working on a MediaWiki to Deki Wiki converter. There have been a number of interesting bumps along the conversion path, such as handling custom MediaWiki extensions. One custom extension that kept popping up was the RSS-feed extension. Although Deki Wiki already exposes its own set of RSS-feed functions (feed.list and feed.table), the input and output behavior didn’t quite match. To maximize compatibility, I wanted the behavior to be identical to the MediaWiki RSS-feed extension. I also wanted to make it possible to easily customize the extension’s HTML output.
Having written a lot of documentation on C# extensions, I was already familiar with using C# to extend Deki Wiki functionality. C# extensions are powerful, but have a high entry barrier since they require the author to write and compile C# code. I wanted something different that was easier to crack open. As I was lamenting about the difficulty of using C# extensions, our chief architect (Steve Bjorg) made me aware of a new mechanism: DekiScript extensions. I knew nothing about them so I studied the DekiScript Extension Tutorial. DekiScript extensions consist entirely of XML and JavaScript and do not require any compilation. Within an hour, I was able to implement the RSS functionality I needed and I had something whose behavior could be easily customized! I will be using this same mechanism to port other bits of MediaWiki behavior, such as reference citing.
You can try out the sample RSS DekiScript extension and tweak its contents to suit your needs:
* Save rssxml.txt as rss.xml.
* Open Control Panel->Service Management
* Add a new local service
* Set type=extension, SID=http://services.mindtouch.com/deki/draft/2007/12/dekiscript.
* Add the following config params: 1.) manifest=xxx, where xxx is the file location of rss.xml. 2.) api-key=xxx, where xxx is your site’s Google API key.
Happy hacking!
categories: Deki Wiki





No Comments »
No comments yet.
RSS feed for comments on this post. TrackBack URL
Leave a comment