WikiDocs Conversion: Difference between revisions

From MusicBrainz Wiki
Jump to navigationJump to search
((Imported from MoinMoin))
 
(Original content from 2006 and dealed with the MoinMoin conversion process.)
 
(28 intermediate revisions by 7 users not shown)
Line 1: Line 1:
#REDIRECT [[WikiDocs]]
The [[Wiki Docs Converter|WikiDocsConverter]] is an component of the planned [[WikiDocs]]. It is a script that can be activated by [[WikiDocs Moderator|WikiDocsModerator]]s and which will copy a specified wiki page from the [[MusicBrainz Wiki|MusicBrainzWiki]] to the [[Moderated Wiki Mirror|ModeratedWikiMirror]].

The wiki mirror will be implemented as a [[Shadow Wiki|ShadowWiki]]. Therefore both the [[MusicBrainz Wiki|MusicBrainzWiki]] and the wiki mirror will be [[Moin Moin|MoinMoin]] wikis. The script has not much to do:
* Take the wiki source from one [[MusicBrainz Wiki|MusicBrainzWiki]] page and make a new version of that same page on the [[Shadow Wiki|ShadowWiki]].
* Convert urls so that non-[[WikiDocs]] pages have an [[Inter Wiki Link|InterWikiLink]] (see below).
* convert relative urls to absolute urls or something like that ( This is something that is currently done by the [[Wiki Web Service|WikiWebService]]. I did not really understand exactly what it does and why it does it).
* Remove unofficial content.

==Convert to Inter Wiki Links==

When a user sees a [[WikiDocs]] page via the [[Wiki Web Service|WikiWebService]], those links that point to other [[WikiDocs]] pages should look like normal links, while those links that point to pages which only exist in the [[MusicBrainz Wiki|MusicBrainzWiki]] should look like links to somewhere else.

One possible solution is to register the [[MusicBrainz Wiki|MusicBrainzWiki]] as a [[Sister Site|SisterSite]] to the [[Shadow Wiki|ShadowWiki]]. The links to non-[[WikiDocs]] pages would then be converted from, say <nowiki>[[Style Guideline|StyleGuideline]] to MBW:StyleGuideline</nowiki>.

In this case, everytime someone copies a page to the [[Moderated Wiki Mirror|ModeratedWikiMirror]], the converter has to look over ''all'' pages in the [[Shadow Wiki|ShadowWiki]] and update the [[Inter Wiki Links|InterWikiLinks]]. All [[Wiki Name|WikiName]]s that are not in [http://wikidocs.musicbrainz.org/write/TitleIndex?action=titleindex http://wikidocs.musicbrainz.org/write/TitleIndex?action=titleindex] get the "MBW:" prefix.

The inconvenient is that visitors would really be sent to the real [[MusicBrainz Wiki|MusicBrainzWiki]]. I do not know if [[Moin Moin|MoinMoin]] can be configured in a way that they are sent to an instance of the wiki that is uneditable and which has a theme that looks similar to the [[Main Site|MainSite]].

Perhaps this can be overcome by using something else than [[Inter Wiki Links|InterWikiLinks]]. The converter could also change the links to ''external'' links to, say, <nowiki>[http://musicbrainz.org/wiki/StyleGuideline http://musicbrainz.org/wiki/StyleGuideline]</nowiki>, which would trigger another [[Wiki Web Service|WikiWebService]] located at /wiki/ which serves content from the [[MusicBrainz Wiki|MusicBrainzWiki]].

Also, pages that do not exist on the [[MusicBrainz Wiki|MusicBrainzWiki]] should not get links. So the converter will probably have to look at the [[Title Index|TitleIndex]] of both the [[MusicBrainz Wiki|MusicBrainzWiki]] and the [[Shadow Wiki|ShadowWiki]] to do the right thing. Problem: The [[Title Index|TitleIndex]] of the [[MusicBrainz Wiki|MusicBrainzWiki]] has to be read in real time. This is no job for the converter, is it?
{| border="1"
|-
| Page in [[Title Index|TitleIndex]] of [[MusicBrainz Wiki|MusicBrainzWiki]] || Page in [[Title Index|TitleIndex]] of [[Shadow Wiki|ShadowWiki]] || Action taken
|-
| Yes || Yes || [[Shadow Wiki|ShadowWiki]] points to itself
|-
| Yes || No || Link should look different and point to [[Wiki Web Service|WikiWebService]] of [[MusicBrainz Wiki|MusicBrainzWiki]]
|-
| No || Yes || Uh? Send a warning to admin. Someone has deleted an official page! Still, [[Shadow Wiki|ShadowWiki]] can point to itself
|-
| No || No || [[Wiki Name|WikiName]] should not be presented as a link at all
|}

God, is this complicated. I will leave the implementation details to Robert.

==Remove Unofficial Content==

I am not 100% sure, we need this.

We could add our own "official" tag to the [[MusicBrainz]] wiki: an XML-style: <pre><official>
</pre>

<pre> bla bla
</pre>

<pre></official>
</pre>

The [[Moin Mion|MoinMion]] engine will of course ignore these tags. It will just display them. That is ok. Users will see the tags (when accessing the wiki via [[Moin Moin|MoinMoin]]) and it will have ''meaning'' to them.

When you feed a page to the converter, it will look for this tag, and ''if'' it finds such tags, it will remove everything outside the tags and then the tags tehmselves in the [[Shadow Wiki|ShadowWiki]] version of that page.

This way the source of a wiki page can contain stuff that will not be visible on the [[Main Site|MainSite]].

----initial author: [[User:DonRedman|DonRedman]]

[[Category:To Be Reviewed]] [[Category:Development]]

Latest revision as of 04:24, 25 October 2009

Redirect to: