The TikiWiki community has produced some scripts to import MediaWiki to TikiWiki. This page describes the advantages and disadvantages of each one considering the implementation of a generic MediaWiki to TikiWiki importer.
MediaWiki to TikiWiki converter
Link: http://dev.tiki.org/tiki-index.php?page=MediaWiki+to+TikiWiki+converter
This script receive the output of the MediaWiki XML export feature and then parses it to TikiWiki syntax using the PEAR::Text_Wiki_Mediawiki and PEAR::Text_Wiki_Tiki.
Although PEAR::Text_Wiki_Mediawiki and PEAR::Text_Wiki_Tiki are outdated, there has been a recent release of PEAR::Text_Wiki_Creole. So using PEAR::Text_Wiki and updating PEAR::Text_Wiki_Tiki might be interesting to have a generic wiki content exchange feature. There is a experimental tool for converting all Text_Wiki supported syntax to Creole here.
Advantages:
- import an MediaWiki instalation using the XML dump file (easy for the user)
- import wiki pages, wiki page history
- everything is done through an user interface
Disadvantages:
- at the moment doesn't import images or other files (the MediaWiki dumpBackup.php script has a experimental argument to include the file URL in the XML dump, so it appears to be possible to import files)
- doesn't import users (the user list is not exported by the XML dump, although it exports all the users that have edited a wiki page in the wiki page history)
- improperly parsing of some tags (possible to fix updating the PEAR libs)
Questions:
- What's the main problem with the current convertor that we have?
Nelson: Apparently the conversion is not really good and it might be broken to changes on the Tiki side.
Rodrigo: Yes, there are some syntax issues with the package Text_Wiki_Tiki. If we are going to use Text_Wiki the first think to do is to update Text_Wiki_Tiki package to support the actual wiki syntax. I wrote to the developer of Text_Wiki_Mediawiki asking about actual situation of the package concerning the support of the syntax. I'm waiting for an answer. - Is a good idea consider using PEAR::Text_Wiki for our importer or there is a better approach?
Nelson: Apparently I've been told it's not very mature and does not really do much. The code is very complicated and perhaps it's not the easiest way to do it.
Rodrigo: I'm not sure if it is that complicate to use Text_Wiki. It seems to give a good structure for interwiki content conversion. My main concern is with the status of the MediaWiki syntax support by the package Text_Wiki_Mediawiki. There is a Python lib called mwlib that has official support from the MediaWiki foundation, so for sure this one is up to date. On the other hand, if we support the package Text_Wiki_Tiki this might be a important step for supporting Wiki Creole as there is a recently updated Text_Wiki_Creole package. I'm in contact with the developer of this package and below I reproduce what she wrote to me after I asked her about her impressions on Text_Wiki:
Text_Wiki_Creole comment on Text_Wiki package
[+]Perl script to import MediaWiki to TikiWiki
Link: http://dev.tiki.org/tiki-index.php?page=MediaWiki+to+TikiWiki+migration+script
It uses perl lib Text::MediawikiFormat to parse the MediaWiki syntax and then a PHP script to insert data in TikiWiki database using TikiWiki functions. It reads MediaWiki content directly from the database.
I tried to test it but I wasn't able to make it work. If it is the case I need to debug it to make it work to have a more detailed description of this script.
Advantages:
- as it connects to the MediaWiki database it is posible to import users (with some concerns about how to deal with their passwords).
Disadvantages:
- written in Perl (I like Perl, but I don't think it is a good idea to have a hybrid importer)
- need shell access