1,411
edits
Progress Continues
We've already had 21646 updates since Dolphin 5.0. Keep up with Dolphin's continuing progress through the Dolphin Blog: February, March, and April 2024 Dolphin Progress Report. |
The Dolphin Emulator Wiki needs your help! Dolphin can play thousands of games, and changes are happening all the time. Help us keep up! Join in and help us make this the best resource for Dolphin. |
(New game page processing script, NEED YOUR INPUT!) |
m (Small script update -- still some bugs/updates to work on with the image code) |
||
Line 26: | Line 26: | ||
my (@problemSection, @configurationSection, @versionCompatSection, @testingSection, @videoSection, @categorySection); | my (@problemSection, @configurationSection, @versionCompatSection, @testingSection, @videoSection, @categorySection); | ||
my @finalResult; | my @finalResult; | ||
$imageSize = 300; | |||
my ($savedImageLine, $savedSizeLine); | my ($savedImageLine, $savedSizeLine); | ||
Line 133: | Line 135: | ||
} | } | ||
} | } | ||
Line 141: | Line 145: | ||
$foundInfobox = 0; | $foundInfobox = 0; | ||
$foundImage = 0; | $foundImage = 0; | ||
$insideInfobox = 0; | |||
my @autoCategory; | my @autoCategory; | ||
Line 156: | Line 161: | ||
$skipUnWiki = 0; | $skipUnWiki = 0; | ||
if ($newLine =~ /^\{\{\ *Infobox.*/ | if ($newLine =~ /^\{\{\ *Infobox.*/i) { | ||
push (@finalResult, '{{Infobox VG'); | |||
$foundInfobox = 1; | $foundInfobox = 1; | ||
$insideInfobox = 1; | |||
$skip = 1; | |||
} | } | ||
Line 197: | Line 205: | ||
#Purge un-used parameters | #Purge un-used parameters | ||
if ($ | if ($insideInfobox) { | ||
#If there was already an image listed in the original page, keep it | #If there was already an image listed in the original page, keep it | ||
if ($newLine =~ /^\|\ *image\ *=\ *.+/gi) { | if (($newLine =~ /^\|\ *image\ *=\ *.+/gi) and ($savedImageLine ne "")) { | ||
$foundImage = 1; | $foundImage = 1; | ||
$skipUnWiki = 1; | $skipUnWiki = 1; | ||
Line 250: | Line 258: | ||
if ($newLine =~ /^\}\}$/) { | if ($newLine =~ /^\}\}$/) { | ||
if ($savedSizeLine ne "") { push (@finalResult, $savedSizeLine); } # Saved size | if ($savedSizeLine ne "") { push (@finalResult, $savedSizeLine); } # Saved size | ||
if (($foundImage eq 0) and ($savedImageLine ne "")) { push (@finalResult, $savedImageLine); } | if (($foundImage eq 0) and ($savedImageLine ne "")) { # Saved image line, if wikipedia doesn't have one | ||
push (@finalResult, $savedImageLine); | |||
} elsif (($foundImage eq 0) and ($savedImageLine eq "")) { | |||
push (@finalResult, '|image = [[File:{{SUBPAGENAME}}.png|' . $imageSize . 'px]]'); | |||
} | |||
push (@finalResult, $newLine); | push (@finalResult, $newLine); | ||
push (@finalResult, " "); | push (@finalResult, " "); | ||
$skip = 1; | $skip = 1; | ||
$insideInfobox = 0; | |||
} | } | ||
edits