Hi these are my thoughts and questions on your suggestions.
I have also updated the design page. Thank you for the guidance!
* Provide a UI in XWiki so that RedPen can be executed
in a job on various
pages of the wiki (let the >user select on what pages to run
it: all
(sub)wikis, a given wiki, a given page and children, a given >page only. It
would generate some report about violations.
* Note that the RedPen integration should be developed
as an XWiki
extension in xwiki-contrib.
If it were an extension, I would think to create an Xwiki component then
export as JAR, instead of creating wiki pages and exporting as XAR. This is
because I’m not sure if functionality implemented through separate wiki
pages would be able to operate throughout the platform. Also, I am not sure
if I can configure RedPen Validators through creating an extension within an
XWiki instance. Correct me if I’m wrong.
* Provide an Admin part to configure the RedPen rules
to execute
This can be integrated in the UI component so there should be no
problems.
Most likely component will pass props using an EventListener that will
determine the command line to execute towards RedPen
* Provide the ability to add new rules defined in wiki
pages (through a
mechanism similar to >UIExtensions - See
http://redpen.cc/docs/latest/#extending-with-java on the redPen side).
I’ll create a Validator plugin, which is the harder method but ensures I can
edit the Validator source code without touching RedPen’s source tree.
* Provide a Script Service so that scripts in wiki
pages can validate any
content using RedPen. Same >from Java (the Script Service
would call the
Java Component).
I was reading this
http://extensions.xwiki.org/xwiki/bin/view/Extension/Script%20Module but I
am still unable to grasp the concept of scripts and how the Java Component
interacts with it. Do you have any other articles that I can reference from?
* Provide an Admin option so that RedPen executes when
a wiki page is saved
(turned off by default). >This would be implemented as an
XWiki Event
Listener and would cancel the save if there are >violations.
If I’m writing a JAR based extension, then I guess I’ll write the
EventListener as a Java component as well. Please correct me here if you
feel that there are other easier methods.
* Research how to embed redPen as a library (as a JAR
dependency) and not
as a standalone server. >That should probably be your first
task. If not
possible we’ll need to have it installed as a server but >that would make
using the XWiki RedPen Extension much more complex.
As stated, I will ask around first to get started. Will update the design
page with what I find.
* (Optional and to be done after the rest is
implemented and if enough time
is left) Contribute to the >RedPen project itself
by contributing support
for the XWiki Syntax 2.1 markup text format. This would >allow to make XWiki
and XWiki Rendering more known to users of RedPen.
I can find time when I’m free to look at the contributing community at
RedPen. Perhaps I can also establish communication with them, while asking
them about the possibility of using RedPen without setting up a server.
--
View this message in context:
http://xwiki.475771.n2.nabble.com/Proposal-RedPen-Integration-into-XWiki-as…
Sent from the XWiki- Dev mailing list archive at
Nabble.com.