User:Keller999/projects/gamepageupdate: Difference between revisions

Jump to navigation Jump to search
mNo edit summary
m (dolphinpageupdate.pl v1.02.4)
Line 84: Line 84:
* [[:Category:Single-player games]] is now filtered out -- I will go back and remove everything from it as well.  I figure, ALL games are single player.
* [[:Category:Single-player games]] is now filtered out -- I will go back and remove everything from it as well.  I figure, ALL games are single player.
* Script no longer mangles description text with the word 'Wii' in it
* Script no longer mangles description text with the word 'Wii' in it
'''''1.02.4'''''
* Template:nihongo is now handled.  Replaced with the subpage name, since this is almost always used to give the Japanese for the game in question on Wikipedia.  Other option would be to replace with the literal translation, but that often does not match the actual game name.
* Trailing spaces no longer cause extra subheadings to be generated


<pre>
<pre>
Line 102: Line 105:


print "************************************\n";
print "************************************\n";
print "* Dolphin Wiki Page Update v1.02.3 *\n";
print "* Dolphin Wiki Page Update v1.02.4 *\n";
print "************************************\n\n";
print "************************************\n\n";


Line 126: Line 129:


print "************************************\n";
print "************************************\n";
print "* Dolphin Wiki Page Update v1.02.3 *\n";
print "* Dolphin Wiki Page Update v1.02.4 *\n";
print "************************************\n\n";
print "************************************\n\n";


Line 154: Line 157:


if    ($newLine =~ /^\{\{\ *Infobox.*/i) { $currentSection = "infobox"; $foundDolphinInfobox = 1; }
if    ($newLine =~ /^\{\{\ *Infobox.*/i) { $currentSection = "infobox"; $foundDolphinInfobox = 1; }
elsif ($newLine =~ /^\ *\={1,4}\ *Problems\ *\=*$/i) { $currentSection = "problems"; }
elsif ($newLine =~ /^\ *\={1,4}\ *Problems\ *\=*\s*$/i) { $currentSection = "problems"; }
elsif ($newLine =~ /^\ *\={1,4}\ *Configuration\ *\=*$/i) { $currentSection = "configuration"; }
elsif ($newLine =~ /^\ *\={1,4}\ *Configuration\ *\=*\s*$/i) { $currentSection = "configuration"; }
elsif ($newLine =~ /^\ *\={1,4}\ *Version Compatibility\ *\=*$/i) { $currentSection = "versionCompat"; }
elsif ($newLine =~ /^\ *\={1,4}\ *Version Compatibility\ *\=*\s*$/i) { $currentSection = "versionCompat"; }
elsif ($newLine =~ /^\ *\={1,4}\ *Testing\ *\=*$/i) { $currentSection = "testing"; }
elsif ($newLine =~ /^\ *\={1,4}\ *Testing\ *\=*\s*$/i) { $currentSection = "testing"; }
elsif ($newLine =~ /^\ *\={1,4}\ *Gameplay\ {1,}Videos\ *\=*$/i) { $currentSection = "videos"; }
elsif ($newLine =~ /^\ *\={1,4}\ *Gameplay\ {1,}Videos\ *\=*\s*$/i) { $currentSection = "videos"; }
elsif ($newLine =~ /^\ *\[\[Category\:.*\]\]$/i) { $currentSection = "categories"; }
elsif ($newLine =~ /^\ *\[\[Category\:.*\]\]$/i) { $currentSection = "categories"; }
elsif ($newLine =~ /^\ *\{\{Navigation\ .*\}\}$/i) { $currentSection = "categories"; }
elsif ($newLine =~ /^\ *\{\{Navigation\ .*\}\}$/i) { $currentSection = "categories"; }
Line 342: Line 345:
$newLine =~ s/\<ref.+?\/.{0,3}\>//gi; # remove citations references
$newLine =~ s/\<ref.+?\/.{0,3}\>//gi; # remove citations references
$newLine =~ s/\{\{vgy\|([0-9]{4})\}\}/$1/gi; # we don't do Template:vgy, removing
$newLine =~ s/\{\{vgy\|([0-9]{4})\}\}/$1/gi; # we don't do Template:vgy, removing
$newLine =~ s/\{\{nihongo\|.*\"(.+)\"\}\}/\{\{SUBPAGENAME\}\}/gi; # we don't do Template:nihongo.  Since this is almost always the name of the page, replace with {{SUBPAGENAME}}
$newLine =~ s/\{\{cite.*?\}\}//gi; # remove references
$newLine =~ s/\{\{cite.*?\}\}//gi; # remove references
$newLine =~ s/\[\[(([.]|[^\|])+?)\]\]/$1/g; # un-wiki-fy wiki links in the format [[link]]
$newLine =~ s/\[\[(([.]|[^\|])+?)\]\]/$1/g; # un-wiki-fy wiki links in the format [[link]]