Aug 13 2018

My GSOC adventure with XWiki and Dokuwiki

Mentors :

I want to thank Thomas Mortagne and Shubham Jain for giving me this opportunity and guiding me throughout this awesome journey patiently.

A little bit about me

I’m a final year B.Tech student, from Bharati Vidyapeeth's College of Engineering, India. I’m 22 years old and I feel pleased to be a part of XWiki community as a GSoC’18 student and learn more about both XWiki and Dokuwiki while playing with Java. 

Description

The project focused on improving the existing DokuWiki importer that imports instances of DokuWiki to XWiki by using some intermediate common events based on Filter Stream Framework. In the previous Dokuwiki importer module already supported basic functionalities. Improvements like support for handling unserializing of files with no metadata, lists, image-link, interwiki-link, macro support and other syntax-parser bug resolution.

You can get inspiration from

http://extensions.xwiki.org/xwiki/bin/view/Extension/Import+DokuWiki+into+XWiki+Application and

Documentation can be found at

https://extensions.xwiki.org/xwiki/bin/view/Extension/DokuWiki

The issue tracker can be found

http://jira.xwiki.org/projects/DOKUWIKI/issues/DOKUWIKI-11?filter=allopenissues

Developer Profile

Java

Status

Successfully terminated

Milestones

Milestone 1 [May 14 - June 15]:

Blocking bug fixing and folder support.

I fixed the warning and critical bugs, by making modifications in dokuwiki-text module. This also included setting up the project and getting used to the Component architecture of XWiki.

  • I started with refactoring my understanding of the Filter API and getting used to the Component architecture of XWiki. 
  • Another challenge was to find the ideal way to check for the input-source type and handle exceptions by reading them and the next task was to add support for DokuWiki data-directory as an input source.
  • Understanding issues with apache compress behavior difference with file input and streaming input. Finding the bug in FileUtils.CopyToFile (closing streams after copying the file) and resolve the FileNotFound Blocking Bug.
  • Fixing the crash of Dokuwiki importer after a few Seconds of start with class ArrayIndexOutOfBoundsException took some days in the debugging phase.
  • The existing code ended up in an infinite loop when importing a tgz input-source package, so the exception handling was added for it to try to find the type of the file before actually read it, before it tried to read it as a zip directly and expect the first read to fail if it's not one basically.
  • Tests were written, and post-testing, the extension was released on XWiki nexus repository. 
  • Finally, documentation was modified on the XWiki extension page. 

Milestone 2 [May 14 - June 15]:

 

Adding more syntax features.

The next step was to modify the DokuWiki-syntax parser module and add support for some more popular features and fixing bugs in image-syntax parsing. The idea was to refine the most of the basic syntax available in DokuWiki. 

  • The initial task for second span tasks was to get the thorough understanding of the DokuWiki syntax module. Critical differences between XWiki syntax and DokuWiki syntax and macros. 
  • Next task was to understand the XWiki rendering API and then, understanding occasional differences in behavior in the XML input and the output string from xwiki/2.1 syntax renderer. 
  • Added support for DokuWiki Interwiki links.
  • Added support for DokuWiki Image links.
  • Added support for DokuWiki indented lists.
  • Fixed the bug of no alignment of images. In the previous module, the image feature support checked for image alignment to be center, left or right but, doesn't return the alignment parameter in the output, so all the images were aligned right. 
  • Test cases were added for the new features. The changes in parser were released as an extension on XWiki nexus repository. 

Milestone 3 [July 20 - August 14]:

Adding macros framework.

The next step was to parse the DokuWiki syntax-plugins and call the relevant methods of the Rendering API so that the output is the XWiki syntax. The idea was to add a DokuWiki macro-framework.

  • I tried to hard-code the DokuWiki plugins in the DokuWiki-syntax parser module initially, but the issue we found was that it's pretty much impossible to support all DokuWiki plugin with all kinds of entry-points, so the challenge was to make it as easy as possible for anyone to add support for new DokuWiki plugins not supported by the standard importer so with the guidance of my mentors I designed a framework which makes it easy to add any DokuWiki-plugin component.

Finally, an updated version of the extension was released on the XWiki nexus repository. 

Deliverables

  • Add improvements to support for ordered, unordered and nested lists.
  • Add code for image-links supporting links to other internal or external pages. 
  • Add support for a folder as a source input. 
  • Handling un-serializing of files with no metadata.
  • Support for Interwiki-link to move to other wikis.  
  • Fix OOM when importing a tgz.
  • Working on FileNotFoundException error. 
  • Add popular macros support with and without arguments.
  • Optimise the way to support various archive type.
  • No alignment of the image detected. 

First Milestone release, latest version here

Second Milestone release, latest version here

Third Milestone release, latest version here

The extension can be downloaded from here

It was a fun and learning experience at the same time this summer with XWiki. The best part was achieving the milestones and doing the release by myself, thanks to my mentors for giving me committer access. emoticon_grin I now have a better idea how everything works in a community, the schedules and deadlines and how to write a code for production. I've learned best practices to be used to code like a modern developer (which was fun for me).
Thank you for reading. emoticon_smile 

Aug 08 2018

My GSoC 2018

My own summary of experience in participating in GSoC 2018 and open source projects contributing ...

Aug 03 2018

Bug Fixing Day 185

This Thursday we had our Bug Fixing Day #185. We've managed to close 9 bugs (9 real fixes) with 4 participants. We are still at -146 bugs behind the 500 days period. ...

Jul 22 2018

XWiki 10.6.1 Released

The XWiki development team is proud to announce the availability of XWiki 10.6.1. This is a bugfix release that covers important issues that we have discovered since 10.6 has been released. ...

Jul 20 2018

XWiki 10.6 Released

The XWiki development team is proud to announce the availability of XWiki 10.6. This release adds a RSS view to the Notifications macro and improves the user picker with compact display and in-line selection. The developers should check the new Page API and the improvements to the existing Icon API. ...

Jul 16 2018

XWiki 10.6RC1 Released

The XWiki development team is proud to announce the availability of XWiki 10.6RC1. This release adds a RSS view to the Notifications macro and improves the user picker with compact display and in-line selection. The developers should check the new Page API and the improvements to the existing Icon API. In addition there have been 23 bugs fixed and a couple of small improvements done. ...

Jul 06 2018

Bug Fixing Day 183

This Thursday we had our Bug Fixing Day #183. We've managed to close 7 bugs (5 real fixes) with 4 participants. We are still at -148 bugs behind the 500 days period. ...

Jun 28 2018

XWiki 9.11.7 Released

The XWiki development team is proud to announce the availability of XWiki 9.11.7. This is a bugfix release that covers important issues that we have discovered since 9.11.6 has been released. ...

Jun 26 2018

Bug Fixing Day 182

This Thursday we had our Bug Fixing Day #182. We've managed to close 3 bugs (3 real fixes) with only 2 participants. We are still at -158 bugs behind the 500 days period. ...

Jun 21 2018

XWiki 10.5 Released

This release improves the visibility of the save button in edit mode and completes retro-compatibility of the new Notifications with the old Activity Stream by handling messages. Admins get more options on deciding how to protect extension pages from user modifications but also easy customization options for the Navigation panel. ...

Tags:
Created by Admin on 2005/01/28
    

Get Connected