1,411
edits
(I think this should fix the extra tester parameter being generated) |
(dolphinpageupdate.pl v1.02.8) |
||
Line 94: | Line 94: | ||
* Improvement on the default infobox (which is broken at the moment, working on that) | * Improvement on the default infobox (which is broken at the moment, working on that) | ||
'''''1.02.7''''' | '''''1.02.7''''' | ||
*Omit infobox title parameter | * Omit infobox title parameter | ||
'''''1.02.8''''' | '''''1.02.8''''' | ||
*Embolden title in description | * Embolden title in description | ||
*Fix for extra tester params being generated | * Fix for extra tester params being generated | ||
'''''1.02.8''''' | |||
* Keep line breaks from Wikipedia article | |||
* Only keep the input line from the existing article if it's actually set | |||
* Fix tester regex to stop duplications, whoops -- capture groups mistake | |||
* Template:nihongo is better handled now | |||
<pre> | <pre> | ||
Line 126: | Line 131: | ||
chomp($line); | chomp($line); | ||
if (($line ne "-1 | if (($line ne "-1") and ($line ne "-2")) { | ||
push (@wikipedia,$line); | push (@wikipedia,$line); | ||
} | } | ||
Line 193: | Line 198: | ||
$savedSizeLine = $newLine; # saved for later | $savedSizeLine = $newLine; # saved for later | ||
$savedSizeLine =~ s/^\|size\ *=\ *(.*)/\|size \=\ $1/i; | $savedSizeLine =~ s/^\|size\ *=\ *(.*)/\|size \=\ $1/i; | ||
} elsif ($newLine =~ /^\|\ *input\ *=\ *.+/gi) { | } elsif ($newLine =~ /^\|\ *input\ *=\ *(.+)/gi) { | ||
$savedInputLine = $newLine; # saved for later | if ($1 =~ /\S/) { | ||
$savedInputLine = $newLine; # saved for later | |||
$savedInputLine =~ s/^\|input\ *=\ *(.*)/\|input \=\ $1/i; | |||
} | |||
} elsif ($newLine =~ /^\|\ *platforms{0,1}\ *=\ *.+/gi) { | } elsif ($newLine =~ /^\|\ *platforms{0,1}\ *=\ *.+/gi) { | ||
$savedPlatformsLine = $newLine; # saved for later | $savedPlatformsLine = $newLine; # saved for later | ||
Line 222: | Line 229: | ||
} # Anything besides filled-out compat reports are not needed, the rest will be regenerated | } # Anything besides filled-out compat reports are not needed, the rest will be regenerated | ||
} elsif ($currentSection eq "testing") { | } elsif ($currentSection eq "testing") { | ||
if ($newLine =~ /^\{\{.+?\|revision\=\s*(.*?)\s*\|os\=\s*(.*?)\s*\|cpu\=\s*(.*?)\s*\|gpu\=\s*(.*?)\s*\|result\=\s*(.*?)\s* | if ($newLine =~ /^\{\{.+?\|revision\=\s*(.*?)\s*\|os\=\s*(.*?)\s*\|cpu\=\s*(.*?)\s*\|gpu\=\s*(.*?)\s*\|result\=\s*(.*?)\s*\|tester\=\s*(.*?)\s*?\}\}/i) { | ||
# Matches test reports with all variables set (tester is optional) and dissects for reassembly (muahahaha!) | # Matches test reports with all variables set (tester is optional) and dissects for reassembly (muahahaha!) | ||
$testResult = "\{\{testing\/entry\|revision\=$1\|OS\=$2\|CPU\=$3\|GPU\=$4\|result\=$5\|tester\=".(($ | $testResult = "\{\{testing\/entry\|revision\=$1\|OS\=$2\|CPU\=$3\|GPU\=$4\|result\=$5\|tester\=".(($6)?"$6":"")."\}\}"; | ||
push (@testingSection, $testResult); | push (@testingSection, $testResult); | ||
} | } | ||
Line 351: | Line 358: | ||
$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\| | $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]] |
edits