[Mediawiki-l] Is there some tool to convert HTML text to Wikitextautomatically

MHart wiki at matthart.com
Tue Jun 7 14:27:23 UTC 2005


I wrote an HTML to wikitext conversion tool for migrating RoboHelp to wiki 
format - it was a lot easier to create than I thought it would be. I don't 
have it posted anywhere, though ... it requires babying when it runs. Only a 
developer could love it. :-) Any good developer who knows internet APIs, 
html and wiki formatting could create such a tool. It took me about 3 hours 
for the first iteration.

The architecture is two apps - an OLE server with an embedded browser and an 
app to run the conversion and instantiate OLE server instances.

while looping through folder with files {
    if Image, create an OLE server object and upload it
    If html page
        parse for bold, italic and convert to wikitext
        parse for links
            open linked page and get the <title></title>
            convert to [[title]]
        parse tables
        parse lists
        remove practically every other tag
            In some cases, I move popups that use <div> tags to below where 
the popup can be selected, and other misc stuff - that's why it's a "hands 
on" conversion
        sometimes use keywords in the page to categorize, otherwise use 
manual, folder-based categorization
}

- MHart
- http://taxalmanac.org


----- Original Message ----- 
From: <Ext-Munish.Mittal at nokia.com>
To: <mediawiki-l at Wikimedia.org>
Sent: Thursday, June 02, 2005 4:49 AM
Subject: [Mediawiki-l] Is there some tool to convert HTML text to 
Wikitextautomatically


Hi

First I would like to thank you all guys for providing quick solutions to 
all my questions.

Now I am facing a new problem and I am sure someone will come up with a 
solution for this too :-)

I have requirement in which I have to convert MSWord format to Wikitext.For 
this I first convert it to HTML which is quite easy.
Then I need to convert HTML to wikitext.Is there any way to do it?

Please suggest guys.

Thanks and Regards,
Munish Mittal
_______________________________________________
MediaWiki-l mailing list
MediaWiki-l at Wikimedia.org
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l 





More information about the MediaWiki-l mailing list