|Title|Stand-alone wiki parser
|Date|29-Nov-2005 20:32:09 EET
|JSPWiki version|
|Submitter|208.200.250.66
|[Idea Category]|GenericIdea
|Reference|
|[Idea Status]|NewIdea

!!!Stand-alone Wiki Parser/Application
__Summary__: Extract the wiki parser or wrap it so that an external application (that is, non-J2EE Web App) can call the engine on Wiki marked-up files and generate HTML.

!!Purpose
There are a lot of documentation formats popping up.  Wiki is almost a defacto standard for documenting projects via a public-accessible web-site.  If project maintainers could write their documentation or manuals in Wiki format and have a generic tool for converting them to HTML, it would make good documentation even easier to create for small and large project maintainers.

!!How it would work
Basically a project, application, whatever could have a directory of Wiki files (either *.txt or *.wiki).  The engine would then take some kind of input telling it how to generate links (use the Web-app linking or use a local-filesystem compatible "WikiName.html" link format).  The stand-alone application would then take a directory and a wiki name as input and call the engine.

So, the app looks for something like Template.html and then it uses the Wiki engine to parse the Wiki name file (e.g. wikiparser doc/wiki-dir dest-dir MyWikiName ==> doc/wiki-dir/Template.html + the contents of MyWikiName.wiki parsed).  It would then output dest-dir/MyWikiName.html, which would be the contents of the Template.html with MyWikiName.wiki parsed and placed in the "Wiki Name Body" content location in the template. 

----

Already done, see EmbeddingJSPWiki, and [this JSPWiki development blog entry|http://blog.jspwiki.org/wiki/Main_blogentry_151105_1].  At least RollerWeblogger has succesfully embedded JSPWiki inside another application.  You will probably need to develop your own PageProvider, though.

-- JanneJalkanen


----

To tell the true, JSPEngine is too much oriented to HttpServletContext and other http things. Partially embedding is possible (I made such module) but very hard in wider context.


--[Jacek Czerwinski|http://klik.com.pl/site], 06-Nov-2007

Um.  We don't have a JSPEngine.  The JSPWikiMarkupParser and XHTMLRenderer should work pretty well without any HTTP servlet stuff - our unit testing works fine without a servlet container!

-- JanneJalkanen