User:Keller999/projects/gamepageupdate: Difference between revisions

Jump to navigation Jump to search
m
dolphinpageupdate.pl v1.1.01 -- alterations based on Kolano's checking of my work, thanks!
m (dolphinpageupdate.pl v.1.1.01 -- makes |tester= optional)
m (dolphinpageupdate.pl v1.1.01 -- alterations based on Kolano's checking of my work, thanks!)
Line 107: Line 107:
'''''1.1.01'''''
'''''1.1.01'''''
* Makes |tester= optional, entries are still purged if the other params are missing (is this desirable or not?)
* Makes |tester= optional, entries are still purged if the other params are missing (is this desirable or not?)
* Testing type entry is now kept if present.  Config type was always kept by the script, so no change needed.
* When replacing Template:nihongo, bold {{SUBPAGENAME}}


<pre>
<pre>
Line 117: Line 119:
$imageSize = 300; # Assuming Wii by default
$imageSize = 300; # Assuming Wii by default


my ($image, $savedSizeLine, $savedInputLine, $savedPlatformsLine);
my ($image, $savedSizeLine, $savedInputLine, $savedPlatformsLine, $pageType);


#######
#######
Line 239: Line 241:
} # 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 =~ /\{\{.*(\|type\=.*?)\}\}/gi) {
$pageType = $1;
}
if ($newLine =~ /^\{\{.+?\|revision\=\s*(.*?)\s*\|os\=\s*(.*?)\s*\|cpu\=\s*(.*?)\s*\|gpu\=\s*(.*?)\s*\|result\=\s*(.*?)\s*(?:\|tester\=\s*(.*?)\s*?){0,1}\}\}/i) {
if ($newLine =~ /^\{\{.+?\|revision\=\s*(.*?)\s*\|os\=\s*(.*?)\s*\|cpu\=\s*(.*?)\s*\|gpu\=\s*(.*?)\s*\|result\=\s*(.*?)\s*(?:\|tester\=\s*(.*?)\s*?){0,1}\}\}/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!)
Line 368: Line 373:
$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/\{\{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/\{\{Citation needed.*?\}\}//gi; # remove 'citation needed'
$newLine =~ s/\{\{Citation needed.*?\}\}//gi; # remove 'citation needed'
Line 512: Line 517:


push (@finalResult, "\n\=\= Testing \=\=");
push (@finalResult, "\n\=\= Testing \=\=");
push (@finalResult, "\{\{testing\/start\}\}");
push (@finalResult, "\{\{testing\/start" . $pageType . "\}\}");
push (@finalResult, '<!--Use this template for test entries: {{testing/entry|revision=|OS=|CPU=|GPU=|result=|tester=}}-->');
push (@finalResult, '<!--Use this template for test entries: {{testing/entry|revision=|OS=|CPU=|GPU=|result=|tester=}}-->');
push (@finalResult, @testingSection);
push (@finalResult, @testingSection);
1,411

edits

Navigation menu