[Gsoc idea] Red Pen Integration

Version 15.1 by De Sheng Chuan on 2017/07/11 17:14

 
 Feature
 Active
 

Description

This is about integrating RedPen into XWiki.

Introduction

RedPen is a proofreading tool that ensures a particular body of text is of a professional quality.

Approach

Phase 1:

  • Figure out how to export RedPen as a JAR library instead of having to operate it as a RedPen server. (Currently asking on redpen's Gitter: redpen-cc-gitter
  • Create main RedPen component within separate api folder
    • XWiki extension primarily contains a Java component that will execute command line onto a RedPen server, or use the RedPen library, depending on how RedPen is implemented.
  • Create XAR ui within an XWiki instance, then export into Maven with XAR Maven plugin
  • RedPen to be executed as a job on pages in the wiki. (Another component to be created)
  • Within the XWiki extension, write an EventListener component that allows RedPen to be executed when a WikiPage is saved. Most likely the onEvent function in the EventListener will return a boolean to the main Java component executing RedPen (Another component)

Phase 2:

  • Clean up UI on XWiki extension (In progress)
  • Allow user to change proofreading rules in the wiki pages, regarding how the document will be checked. Most proofreading settings will be available under the global administration wiki. Corrections on language expressions and spellings would be housed under the main page.
  • Create a dictionary based on the entries the user creates in the application home page. 
  • Create a script service that calls the Java component in the extension to execute RedPen on any XWiki Page.

Phase 3:

  • Debugging
  • Contribute support for the XWiki Syntax 2.1 markup text format in RedPen

RedPen

  • Redpen provides a library, redpen-core, on the Maven central repository. The library allows a person to build a RedPen object that can validate and export errors in the form of a JSON object. It also provides Parser classes to be parse in text inputs of many formats.
  • Validation: The redpen object must be instantiated with a XML file containing its configuration setting. The XML contains nodes called Validators, which just references existing implementations of the validators in the RedPen Core library. To edit the configuration, one just needs to edit the XML file itself. This can be done in Java issues.

About the UI:

  • Consists of the application home page, where users can key in potential wrong expressions and spellings, and the recommended correction. 
  • Contains a configurable class that provides basic settings that users can toggle.
  • Also contains a dictionary section where user can review dictionary of expressions that affect expression validations

updated_admin_ui_2.PNG

  • updated_admin_ui.PNG

App_home.PNG


 


Tags: gsoc
    

Get Connected