History:Wiki Migration Bot: Difference between revisions

From MusicBrainz Wiki
Jump to navigationJump to search
(changed tense (Imported from MoinMoin))
 
((Imported from MoinMoin))
Line 60: Line 60:


Author: [[User:JohnCarter|JohnCarter]]
Author: [[User:JohnCarter|JohnCarter]]
[[Category:To Be Reviewed]] [[Category:Wiki]]

[[Category:To Be Reviewed]]

Revision as of 12:24, 24 July 2005

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 (;[[Some Term|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.

Current Issues:

  • There are a few pages that the bot doesn't create. eg: "Bramp DataFormatIssues Nigritude_Ultramarine QualityImprovement".
    • 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.
      • 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). - DaveEvans
      • * 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. --JohnCarter

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

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