History:Wiki Migration Bot

From MusicBrainz Wiki
Revision as of 13:46, 25 July 2005 by JohnCarter (talk | contribs) (removed my empty pages idiocy, added it as a feature :) (Imported from MoinMoin))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

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.

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

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 :-)

Ported Pages with Broken Markup:

  • EditAlbumName
    • All the EditTypes pages use anchors & links in titles, which don't work on 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 Dupuy about this and I cannot help to mischieviously note that I always said that 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. --DonRedman
      • * OK, that sounds easy enough! --JohnCarter

Author: JohnCarter