I built on what Cameron had (thanks Cameron!), converted it to Ruby, and now have a script that will give you at least a good starting point when migrating a site from Mediawiki to Wikidot. Check out: https://github.com/lynnfaraday/wikiMigrate
Posted by Helmut_pdorf on 12 Dec 2008 19:03, last edited by Helmut_pdorf on 19 Apr 2013 18:59
Tags: conversion convert konversion mediawiki word
Such functionality would be great! But the work for such conversion program is great and need a lot of team work…
Here is the start with a first try of a little program. Thanks to Cameron Sanantonio who made the start.
I copied this from a post in the community forum. This can be a project in the future… now it is only a beginning…
Cameron Sanantonio wrote:
I knocked this up in a two hour coding session tonight. I have a wiki over at Wikia.com… unfortunatly I have two problems with them. (1) Slow, (2) Ads. 1 is kinda random… sometimes the wiki is really really fast, many times it's not. And while I don't normally mind web ads, the way they do 2 breaks standard Wiki layout. I had picked them because I wanted to import my older Mediawiki wiki without lots of personal work.
Well, I'd rather host the wiki here, but nobody wanted to volunteer to convert the MediaWiki syntax to Wikidot syntax. So I built a script to do (most of) it.
http://autodmc.org/wikimedia-to-wikidot.php
Paste your MediaWiki text into the textbox, click submit, wait a bit while my handful of regular expressions crunch over the file, and then take the output out of the top box when the page loads.
What can it convert?
- Headings
- Most Wiki Links
- Bold, Italic, Underline, Strikeout
- Ordered, Unordered, Mixed Lists
- TOC tags
- Comments
- <nowiki> and <pre>
- Super and sub scripts
The regexes could most likely be better written, they're my first stab at flying solo in regex land.
This code currently doesn't touch images or tables. Images because I'm tired, tables because I don't want to jump into that pit.
And the code isn't perfect; sometimes it misses a tag. That's the (much of) and (mostly) bits above.
Here's an example of a conversion:
Wikia: http://usflexicon.wikia.com/wiki/USS_Lexington
Wikidot: http://thelexicon.wikidot.com/usslexington-direct-import
I added some junk code between the TOC and the first heading while doing the direct-import:
<!-- Commenty Goodness *(*&)@#(*&$(^ -->
<nowiki> '''''Do not render!''''' </nowiki>
<pre> LOL </pre>
<nowiki> <pre> WTF </nowiki> </pre>
Some <s>Strikeout</s> and <del>Deleted</del> materials, followed by <ins>Inserted</ins> and <u>underline!</u>
LOL<sub>WHUT</sub> or LOL<sup>WHUT</sup>.
MediaWiki allows you to add Category as links at the bottom of the articles… is something similar to this possible in Wikidot? If not, just cut those bits off when you're done converting.
As you can see, it doesn't do everything but it takes some of the drudgery out of converting articles, especially for big articles. Just run a quick eye over a Preview of the page and you'll catch the errors most likely.
ideas on how to make the regexs suck less? Wanna tackle images or tables? Let me know and I'll update the code. If you guys like it, I'll spiff the page up a bit (it's just a hacked internal tool right now :D).
Links
This is an idea first shown in the post: http://community.wikidot.com/forum/t-111212/convert-much-of-mediawiki-syntax-to-wikidot-syntax-mostly#post-328152.
Backlinks
Author
Cameron Sanantonio. Please visit his/her userPage.
I built on what Cameron had (thanks Cameron!), converted it to Ruby, and now have a script that will give you at least a good starting point when migrating a site from Mediawiki to Wikidot. Check out: https://github.com/lynnfaraday/wikiMigrate
See also http://community.wikidot.com/forum/t-10433/comments/show#post-1756048 - about MS Word Conversion!
Service is my success. My webtips:www.blender.org (Open source), Wikidot-Handbook.
Sie können fragen und mitwirken in der deutschsprachigen » User-Gemeinschaft für WikidotNutzer oder
im deutschen » Wikidot Handbuch ?
If you are linking to a pdf file that has been uploaded to the page which you are editing, the question is:
How to go a specific page in the pdf file?
In the Wikipedia you can do, ie go to the page =4, iaw with the following code:
[[File:Una traducción del Quijote (1).pdf|thumb|right|page=4|File pdf con la novela ''Una traducción del Quijote'' de [[Florencio Moreno Godino]].]]
Not, it is not possible to go to a specific page. But it's a good idea so you might want to add it to the official bugs and wishes site at http://feedback.wikidot.com/wish:_all
Rob Elliott - Strathpeffer, Scotland - Wikidot first line support & community admin team.
You can do it with the syntax discussed here. Here is an example.
Timothy Foster - @tfAuroratide
Auroratide.com - Go here if you're nerdy like me
Well you learn something new every day, thanks Timothy. I think this needs adding to the syntax documentation.
Rob Elliott - Strathpeffer, Scotland - Wikidot first line support & community admin team.
Great
It works perfectly
Many thanks Timothy
That's great! But could it be done the other way?
And could we convert Wikidot skins to MediaWiki?
And is there a tuto to make such a script?
This would be a big work to convert wikidot syntax to media wiki source.
And as I know there is no tutorial to make such a script ..
Service is my success. My webtips:www.blender.org (Open source), Wikidot-Handbook.
Sie können fragen und mitwirken in der deutschsprachigen » User-Gemeinschaft für WikidotNutzer oder
im deutschen » Wikidot Handbuch ?
I looked hard for conversion packages, and in the end wrote my own (and heavily customised it to transfer across our naming conventions, and add lots of new data interconnections)
It took 9 months, but the final mediawiki solution is much better than the wikidot one, and 30000 pages have escaped!
Hi,
is your package for conversion free ?
If yes, can you share it ?
Too customised at present. I might release a slimmed down version, but really don't want to handle support questions if it becomes popular. If someone else wanted to take it on, much better for me.
Wow, what a success .
Congratulation to your conversion!
Service is my success. My webtips:www.blender.org (Open source), Wikidot-Handbook.
Sie können fragen und mitwirken in der deutschsprachigen » User-Gemeinschaft für WikidotNutzer oder
im deutschen » Wikidot Handbuch ?
What I have found on github:
https://github.com/KermMartian/wikidot-to-mediawiki
Service is my success. My webtips:www.blender.org (Open source), Wikidot-Handbook.
Sie können fragen und mitwirken in der deutschsprachigen » User-Gemeinschaft für WikidotNutzer oder
im deutschen » Wikidot Handbuch ?