History:Wiki Migration Bot: Difference between revisions

From MusicBrainz Wiki
Jump to navigationJump to search
(changed tense (Imported from MoinMoin))
 
 
(13 intermediate revisions by 4 users not shown)
Line 1: Line 1:

The script that was used to port this wiki from [[Use Mod|UseMod]] to [[Moin Moin|MoinMoin]] saved the ported pages under the username WikiMigrationBot.
The script that was used to port this wiki from [[Use Mod|UseMod]] to [[Moin Moin|MoinMoin]] saved the ported pages under the username WikiMigrationBot.


The script reports any broken markup at the bottom of each broken page, and links to the [[Wiki Migration Bot Report|WikiMigrationBotReport]] page. Editors can find pages that need to be fixed by following backlinks from that page.
The script reports any broken markup at the bottom of each broken page, and links to the [[Wiki Migration Bot Report|WikiMigrationBotReport]] page. Editors can find pages that need to be fixed by following backlinks from that page.

==Download:==

The wiki migration bot is a perl script, and is available for download [http://code.google.com/p/usemod-to-moinmin-wikiport/ here] ([http://usemod-to-moinmin-wikiport.googlecode.com/files/wikiport.zip direct download]).

The code has been released under an [http://www.apache.org/licenses/LICENSE-2.0 Apache 2.0 license].


==Features:==
==Features:==
Line 10: Line 15:
** [[Image In Title|ImageInTitle]]s are moved to the line above the title so that the image is displayed (looks ugly, but it's better than a broken link).
** [[Image In Title|ImageInTitle]]s are moved to the line above the title so that the image is displayed (looks ugly, but it's better than a broken link).


* [[Use Mod|UseMod]] definition lists (<nowiki>;[[Some Term|SomeTerm]]: a definition</nowiki>) are converted to bulleted lists, because this allows links in the [[Some Term|SomeTerm]] part to work. Two sets of square braces at the start of the line are also stripped out, to removed the anchor'ed bullet point used in the [[Edit Type Template|EditTypeTemplate]].
* [[Use Mod|UseMod]] definition lists (<code><nowiki>SomeTerm: a definition</nowiki></code>) are converted to bulleted lists, because this allows links in the [[Some Term|SomeTerm]] part to work. Two sets of square braces at the start of the line are also stripped out, to removed the anchor'ed bullet point used in the [[Edit Type Template|EditTypeTemplate]].
* Fixes some markup because [[Moin Moin|MoinMoin]] is more strict than [[Use Mod|UseMod]] - for example [[Use Mod|UseMod]] allows any number of ='s at the end of a title, while [[Moin Moin|MoinMoin]] insists on the same number as at the start.
* Fixes some markup because [[Moin Moin|MoinMoin]] is more strict than [[Use Mod|UseMod]] - for example [[Use Mod|UseMod]] allows any number of ='s at the end of a title, while [[Moin Moin|MoinMoin]] insists on the same number as at the start.
* Replaces html literals (eg namp, ndash, bull) with text.
* Replaces html literals (eg namp, ndash, bull) with text.
* Converts html entity codes to Unicode characters.
* Converts html entity codes to Unicode characters.
** There was an issue with a missing encode() (fixed by [[User:DaveEvans|DaveEvans]]) that caused the following error message:
** There was an issue with a missing encode() (fixed by [[User:DaveEvans|DaveEvans]]) that caused the following error message: <pre>Use of uninitialized value in substitution iterator at /usr/local/share/perl/5.8.4/URI/_query.pm line 16.</pre>


* Empty pages are not ported.
<code>Use of uninitialized value in substitution iterator at /usr/local/share/perl/5.8.4/URI/_query.pm line 16.</code>


==Current Issues:==
==Current Issues:==


* The bot has made a bit of a hash of pages with <pre>lots ofpre-formatted textlike this</pre> (for example, source code or terminal dumps). In these cases I've been referring to the [[Old Wiki|OldWiki]] and copying+pasting the content back across by hand.
* There are a few pages that the bot doesn't create. eg: "Bramp [[Data Format Issues|DataFormatIssues]] Nigritude_Ultramarine [[Quality Improvement|QualityImprovement]]".
* [http://wiki.musicbrainz.org/?action=fullsearch&context=180&value=nowiki&fullsearch=Text Quite a few pages] also have <code><nowiki><nowiki></nowiki></code> markup which probably needs to be replaced by <code><nowiki> `stuff here` </nowiki></code>
** I don't know why, but the bot doesn't seem to be able to port the above pages - on every run it says "Creating", but doesn't actually do anything. There don't seem to be many of these pages, so it might be easiest to just port these odd cases by hand.
* Likewise [http://wiki.musicbrainz.org/?action=fullsearch&context=180&value=<code>&fullsearch=Text <code>] crops up now and again
*** It's presumably not a coincidence that these four pages are all blank. I have a feeling that Moin won't allow you to save a blank page, so that would explain it. Since the pages are blank anyway, it's probably a good idea not to import them (as opposed to creating some kind of "almost blank" page). - [[User:DaveEvans|DaveEvans]]
** only two pages, both fixed
*** * OK, well I guess that was just me being stupid, of course you're right. Sorry about that. I could have sworn I'd taken a look at the source of the pages that weren't being copied. --[[User:JohnCarter|JohnCarter]]

==Ported Pages with Broken Markup==

Pages that need work can be found by following the backlinks from the [[Wiki Migration Bot Report|WikiMigrationBotReport]]. Any other pages that need special attention should be listed here.


==Resolved Issues==
==Resolved Issues==
Line 44: Line 53:
** I think these are fixed --[[User:JohnCarter|JohnCarter]]
** I think these are fixed --[[User:JohnCarter|JohnCarter]]


* I wish the bot didn't complain about all those occasions when the [[Wiki Name|WikiName]] "[[MusicBrainz]]" has been used in a heading :-)
===Ported Pages with Broken Markup:===

* [[Home Page|HomePage]]
** I just realized ther is another problem with the [[Home Page|HomePage]]. When [[WikiDocs]] will be implemented, [[Home Page|HomePage]] will have different meanings. so [[Home Page|HomePage]] should be renamed to [[Wiki Home|WikiHome]] (anyone knows a better [[Wiki Name|WikiName]]?). There is some info on this on how this works on [http://moinmoin.wikiwikiweb.de/HelpOnActions Moin:HelpOnActions] --[[User:DonRedman|DonRedman]]
** how about [[Main Page|MainPage]]? [[Wiki Main Page|WikiMainPage]] or [[Documentation Main Page|DocumentationMainPage]], or indeed, abolishing it altogether, it needs a real restructuring in layout and content to be usefull on the actual site. -- Mo
*** Yes, but this script only cares about a dumb copy of the content - we will continue to [[Restructure The Wiki|RestructureTheWiki]] after everthing is moved to [[Moin Moin|MoinMoin]]. --[[User:JohnCarter|JohnCarter]]

* [[Edit Album Name|EditAlbumName]]
** All the [[Edit Type|EditType]]s pages use anchors & links in titles, which don't work on [[Moin Moin|MoinMoin]].
** Probably the best way to fix the anchors is to move them to the line above, but the links won't work anyway.
*** I had a debate with [[User:Dupuy|Dupuy]] about this and I cannot help to mischieviously note that I always said that [[Anchors Are Bad|AnchorsAreBad]]. So IMHO the best way to deal with this is to remove the anchors completely and find a more wiki-like structure to represent the same thing. This is something for human editors, though. I thus propose that you simply break things and report that, then someone will come and fix it. --[[User:DonRedman|DonRedman]]
*** * OK, that sounds easy enough! --[[User:JohnCarter|JohnCarter]]

----

Author: [[User:JohnCarter|JohnCarter]]


[[Category:To Be Reviewed]]
[[Category:Wiki]]

Latest revision as of 13:34, 12 November 2011

The script that was used to port this wiki from UseMod to MoinMoin saved the ported pages under the username WikiMigrationBot.

The script reports any broken markup at the bottom of each broken page, and links to the WikiMigrationBotReport page. Editors can find pages that need to be fixed by following backlinks from that page.

Download:

The wiki migration bot is a perl script, and is available for download here (direct download).

The code has been released under an Apache 2.0 license.

Features:

  • Converts markup from UseMod to MoinMoin.
  • Lines that need manual work (mainly links or images in titles) are flagged in a section at the bottom of the page, and link to WikiMigrationBotReport.
    • ImageInTitles are moved to the line above the title so that the image is displayed (looks ugly, but it's better than a broken link).
  • UseMod definition lists (SomeTerm: a definition) are converted to bulleted lists, because this allows links in the SomeTerm part to work. Two sets of square braces at the start of the line are also stripped out, to removed the anchor'ed bullet point used in the EditTypeTemplate.
  • Fixes some markup because MoinMoin is more strict than UseMod - for example UseMod allows any number of ='s at the end of a title, while MoinMoin insists on the same number as at the start.
  • Replaces html literals (eg namp, ndash, bull) with text.
  • Converts html entity codes to Unicode characters.
    • There was an issue with a missing encode() (fixed by DaveEvans) that caused the following error message:
      Use of uninitialized value in substitution iterator at /usr/local/share/perl/5.8.4/URI/_query.pm line 16.
  • Empty pages are not ported.

Current Issues:

  • The bot has made a bit of a hash of pages with
    lots ofpre-formatted textlike this
    (for example, source code or terminal dumps). In these cases I've been referring to the OldWiki and copying+pasting the content back across by hand.
  • Quite a few pages also have <nowiki> markup which probably needs to be replaced by `stuff here`
  • Likewise &fullsearch=Text crops up now and again
    • only two pages, both fixed

Ported Pages with Broken Markup

Pages that need work can be found by following the backlinks from the WikiMigrationBotReport. Any other pages that need special attention should be listed here.

Resolved Issues

  • Definition list titles don't link in MoinMoin. For example, the Old/New list headings on MusicBrainzGuideline wouldn't link if they were in MoinMoin.
    • I think the neat way to fix this is to replace definition lists with Title: \n Indented Text. It looks pretty much the same, and allows linking. --JohnCarter
  • Images & links in title aren't supported by MoinMoin, flag them up so that they can be fixed by hand.
    • How do you handle links that use images, e.g. [[[Image:something.gif]]]? Not sure how many of these there are, but there might be some. @alex
  • <nowiki></nowiki> tags can encapsulate multiple words, and there's no direct equivalent in MoinMoin.
    • While the <nowiki></nowiki> pseudo-HTML that Usemod supports can be used to de-activate a single word, in which case the MoinMoin equivalent would be ! (e.g. WikiName), but it can also de-activate an entire region of text, in which case the only MoinMoin equivalent would be the (which is actually the same as <code><nowiki> </nowiki>). Can the bot flag the latter case, as it is likely to need editor attention? @alex
      • OK, the bot will flag up these cases (should be quite rare).
  • UseMod seems to interpret lines with only spaces and tabs in them as blank lines, but your script puts a pre line. There are such lines on DonRedman which renders like this. Of course this is a rather minor bug. --DonRedman
  • Some pages use anchors like this <span id="anchorname"></span> and [http:#anchorname link to anchor]. Have you thought of them? --DonRedman
  • I wish the bot didn't complain about all those occasions when the WikiName "MusicBrainz" has been used in a heading :-)