Hi all,
I was wondering how do you get mediawiki content into xml. Is it an home made script ? Simple ? A sophisticated and a heavy process ?
I didn't found any detailed information about it on the fedoraproject website.
I am making some latex/pdfs files from mediawiki content of fedora-fr.org with an ugly php script and I think it's time to think to something more efficient. So any advices are welcome :)
I already have a look to the wiki2xml extension[1], which can be a possibility.
Regards, Pascal
Pascal wrote:
Hi all,
I was wondering how do you get mediawiki content into xml. Is it an home made script ? Simple ? A sophisticated and a heavy process ?
I didn't found any detailed information about it on the fedoraproject website.
I am making some latex/pdfs files from mediawiki content of fedora-fr.org with an ugly php script and I think it's time to think to something more efficient. So any advices are welcome :)
I already have a look to the wiki2xml extension[1], which can be a possibility.
Regards, Pascal
Unfortunately those scripts are mostly snakeoil. I've tried many of them and even had my hand at writing one myself but there is no easy way to convert them. The main issue is the conflicting views over what constitutes good XML. Most of the scripts produce horrendous XML.
Also bear in mind what you are trying to do. Wiki is a simple markup language, docbook XML is a rich markup language. Wiki has elements related to formatting, docbook usually ignores formatting meta data. Wiki sometimes has inline PHP which just kills everything (if you have ever tried to write something which parses code as well as data you will know it's easier to write a cross compiler). To summarize it is a near impossible tasks to do well.
All that said, it's much easier to go the other way, from XML to wiki.
Chris
Hi all,
There are several ways to do that. Depending on if you have physical access, there are a few simple and complete steps.
1. Please visit MWDump tool. This is available at: http://www.mediawiki.org/wiki/Mwdumper 2. The other way is also directly omnipresent at: http://toolserver.org/~magnus/wiki2xml/w2x.php 3. MediaWiki also allows exporting articles to a simplified XML format. Now if the job is to export and import docs. The link to do that is at: http://en.wikibooks.org/wiki/MediaWiki_Administrator%27s_Handbook/Importing
I could guide you thru' each of these, if you would like to do so. Let me know.
Thanks, Sibir
On Sun, Mar 1, 2009 at 8:19 PM, Pascal pascal22p@parois.net wrote:
Hi all,
I was wondering how do you get mediawiki content into xml. Is it an home made script ? Simple ? A sophisticated and a heavy process ?
I didn't found any detailed information about it on the fedoraproject website.
I am making some latex/pdfs files from mediawiki content of fedora-fr.org with an ugly php script and I think it's time to think to something more efficient. So any advices are welcome :)
I already have a look to the wiki2xml extension[1], which can be a possibility.
Regards, Pascal
[1] http://toolserver.org/~magnus/wiki2xml/w2x.php
-- fedora-docs-list mailing list fedora-docs-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-docs-list
On Sun, Mar 01, 2009 at 02:49:01PM +0000, Pascal wrote:
Hi all,
I was wondering how do you get mediawiki content into xml. Is it an home made script ? Simple ? A sophisticated and a heavy process ?
I didn't found any detailed information about it on the fedoraproject website.
I am making some latex/pdfs files from mediawiki content of fedora-fr.org with an ugly php script and I think it's time to think to something more efficient. So any advices are welcome :)
I already have a look to the wiki2xml extension[1], which can be a possibility.
There is a python-mwlib to which the MediaWiki developers actually contribute. It's in Fedora 10, but I seem to recall there may be some breakage going on right now because of an underlying library (odfpy?) that was pushed prematurely.
I think Ian Weller was working on this. Ian, what's the status?
On Mon, Mar 02, 2009 at 09:01:44AM -0500, Paul W. Frields wrote:
On Sun, Mar 01, 2009 at 02:49:01PM +0000, Pascal wrote:
Hi all,
I was wondering how do you get mediawiki content into xml. Is it an home made script ? Simple ? A sophisticated and a heavy process ?
I didn't found any detailed information about it on the fedoraproject website.
I am making some latex/pdfs files from mediawiki content of fedora-fr.org with an ugly php script and I think it's time to think to something more efficient. So any advices are welcome :)
I already have a look to the wiki2xml extension[1], which can be a possibility.
There is a python-mwlib to which the MediaWiki developers actually contribute. It's in Fedora 10, but I seem to recall there may be some breakage going on right now because of an underlying library (odfpy?) that was pushed prematurely.
I think Ian Weller was working on this. Ian, what's the status?
I've been highly distracted and if anyone else can work on it that would be wonderful. https://bugzilla.redhat.com/show_bug.cgi?id=486678 I think Jef has released a new dateutil but I can't remember.
Le Sun, 1 Mar 2009 14:49:01 +0000, Pascal pascal22p@parois.net a écrit :
Hi all,
I was wondering how do you get mediawiki content into xml. Is it an home made script ? Simple ? A sophisticated and a heavy process ?
Thanks for all the answers, I need to have a closer to all of them now.
Pascal
On Tue, Mar 03, 2009 at 12:25:37AM +0000, Pascal wrote:
Le Sun, 1 Mar 2009 14:49:01 +0000, Pascal pascal22p@parois.net a écrit :
Hi all,
I was wondering how do you get mediawiki content into xml. Is it an home made script ? Simple ? A sophisticated and a heavy process ?
Thanks for all the answers, I need to have a closer to all of them now.
I used mw-render form python-mwlibs for all the F10 work, here are the notes I took:
http://fedoraproject.org/wiki/User:Kwade/Post-processing_wiki2xml_results
As was pointed out, the output is accurate for formatting but there is no contextual meaning. This is why we use a strict wiki markup pattern that allows us to manually clean-up.
http://fedoraproject.org/wiki/WikiEditing#Marking_Technical_Terms
What I mean is, if you use '''Application Name''' consistently, then that shows in the XML as <emphasis role="bold">Application Name</emphasis>. You can then do a search for each instance of <emphasis role="bold"></emphasis> and change it to the contextually meaningful <application></application>.
It is a bit tedious, but in the end ... it takes the same energy to convert from wiki to XML as XML to wiki. One way you compress out meaning, the other way you add in meaning.
- Karsten
Le Wed, 4 Mar 2009 08:20:55 -0800, Karsten Wade kwade@redhat.com a écrit :
I used mw-render form python-mwlibs for all the F10 work, here are the notes I took:
http://fedoraproject.org/wiki/User:Kwade/Post-processing_wiki2xml_results
As was pointed out, the output is accurate for formatting but there is no contextual meaning. This is why we use a strict wiki markup pattern that allows us to manually clean-up.
I didn't look at it yet :)
We already have some rules for the wiki and we try to keep it simple. No condition case, php, complicated/nested wiki markup... The contextual meaning is a problem.
http://fedoraproject.org/wiki/WikiEditing#Marking_Technical_Terms
What I mean is, if you use '''Application Name''' consistently, then that shows in the XML as <emphasis role="bold">Application Name</emphasis>. You can then do a search for each instance of <emphasis role="bold"></emphasis> and change it to the contextually meaningful <application></application>.
We've got specific wiki markup for these that need to be kept in the xml:
<app>Application name</app> <path>/chemin/vers</path> <cmd>command</cmd> <touche>Key</touche> and so on
The other thing I want to keep is the templates. Templates shouldn't be expanded in the xml.
Actually, these specific markup and templates are kept into latex commands or environnements:
\newcommand{\cmd}[1]{\textit{{\large\guilsinglleft},#1,{\large\guilsinglright}}\xspace}
\newenvironment{Warning}{% \definecolor{shadecolor}{rgb}{1,0.9,1}% \begin{center}\begin{shaded}\begin{footnotesize}% \raisebox{\dimexpr-\height+0.5\baselineskip}% {\includegraphics[width=1cm]{InProgress_tip}} \hfill\begin{minipage}[t]{\dimexpr\textwidth-1.2cm}% } {% \end{minipage}\end{footnotesize}\end{shaded}\end{center}}
Pascal