DokuWiki Text

Last modified by Thomas Mortagne on 2024/10/21 00:06

cogFilter stream extension to parse a DokuWiki TEXT package
TypeJAR
CategoryFilter
Developed by

Thomas Mortagne, Shubham Jain, Neha Gupta, Michael Hamann

Active Installs6
Rating
0 Votes
LicenseGNU Lesser General Public License 2.1

Installable with the Extension Manager

Description

Filter stream extension to parse a DokuWiki data package compressed and archived as a "tar.gz". DokuWiki stores pages in text format. 

Supported input

Data as TGZ

DokuWiki supports file-based storage where all the data associated to the wiki is stored in the "dokuWiki" folder of the DokuWiki installation (typically in /var/www). This folder can be used for backing up or exporting the wiki. The wiki spaces and documents are stored in the dokuwiki/data/pages/ directory as text files, see https://www.dokuwiki.org/faq:backup. DokuWiki also recommends packaging the data folder as TGZ to preserve file metadata such as file timestamps, see https://www.dokuwiki.org/faq:servermove. 

Data as Directory

You can also use the path to "dokuwiki" folder as a source input directly (file-based storage is recommended).

Import a DokuWiki data to XWiki instance

filterapp.png

dokuwikitext.png

  • After you have installed the two extensions, click on the Filter Stream Converter entry from the Applications panel
  • Choose the "XWiki instance output stream (xwiki+instance)" output type
  • Choose the "DokuWiki Text input stream (dokuwiki+text)" input type
    • Enter the path of the DokuWiki's directory as any apache compress supported format  like tgz or zip, folder, in case of file, enter the path followed by 'file:', as shown below.
    • If this is your first time, leave everything else to default values. 

filterconfig.png

After you have completed these steps, click the "Convert" button. After that, you will see the conversion progress.

Page Naming

 

DokuWiki 2.0+ Pages named "start" are treated as the main page of their space. All other pages are imported as regular nested pages. If there is a conflict like both a page "space:page" and a page "space:page:start", then "space:page" is converted as a non-nested page "space.page" and "space:page:start" is converted as the nested page "space.page.WebHome". If this happens in the root of a wiki, the non-nested page is nested under the "Main" space (like "Main.page") as XWiki doesn't support non-nested pages in the root of the wiki. Similarly, the main "start" page of the wiki is imported as "Main.WebHome" to be treated as the start page of the wiki.

Media Files

 

Media files in DokuWiki correspond to attachments in XWiki. While in DokuWiki, media files can exist independent of pages, in XWiki an attachment always belongs to a page. Therefore, media files need to be associated with pages during the import.

DokuWiki <2.0 When a page is imported, all media files from the same namespace as the page are attached if their name occur in the content. Other media files aren't imported.

DokuWiki 2.0+ Each media file is attached to the non-terminal page that corresponds to the media file's namespace in DokuWiki. If the page doesn't exist, it is created (as an empty page).

Prerequisites & Installation Instructions

We recommend using the Extension Manager to install this extension (Make sure that the text "Installable with the Extension Manager" is displayed at the top right location on this page to know if this extension can be installed with the Extension Manager).

You can also use the manual method which involves dropping the JAR file and all its dependencies into the WEB-INF/lib folder and restarting XWiki.

Dependencies

Dependencies for this extension (org.xwiki.contrib.dokuwiki:dokuwiki-text 3.1):

  • com.xk72:pherialize 1.2.4
  • org.apache.commons:commons-compress 1.26.1
  • commons-codec:commons-codec 1.16.1
  • org.xwiki.platform:xwiki-platform-filter-event-model 16.2.0
  • org.xwiki.platform:xwiki-platform-filter-event-user 16.2.0
  • org.xwiki.platform:xwiki-platform-model-api 16.2.0
  • org.xwiki.contrib.dokuwiki:dokuwiki-syntax 3.1
  • org.xwiki.rendering:xwiki-rendering-syntax-xwiki21 16.2.0
  • xerces:xercesImpl 2.12.2

Get Connected