User:Keller999/projects/gamepageupdate: Difference between revisions

Title is presumed to be {{SUBPAGENAME}} by the infobox template, so it's preferred to output nothing, though there may be cases where it's preferable to omit (GC)/(Wii) postfixes for the infobox title
m (dolphinpageupdate.pl v1.02.6)
(Title is presumed to be {{SUBPAGENAME}} by the infobox template, so it's preferred to output nothing, though there may be cases where it's preferable to omit (GC)/(Wii) postfixes for the infobox title)
Line 93: Line 93:
* Spacing adjustments
* Spacing adjustments
* 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'''''
*Omit infobox title parameter


<pre>
<pre>
Line 333: Line 335:
#Purge un-used parameters
#Purge un-used parameters
if ($insideInfobox) {
if ($insideInfobox) {
#Replace whatever title Wikipedia is using with our own
if ($newLine =~ /^\|\ *title\ *=\ *.+/gi) {
$newLine = '|title = {{SUBPAGENAME}}';
}
# If the parameter is not in our list, it's ignored
# If the parameter is not in our list, it's ignored
if ($newLine =~ /^\|\ *(title|developer|publisher|distributor|director|producer|designer|programmer|artist|composer|license|series|engine|resolution|released|genre|mode|ratings|dspcode|dtkadpcm|channeltype|mode|modes)\ *=\ *.{2,}/gi) {
if ($newLine =~ /^\|\ *(developer|publisher|distributor|director|producer|designer|programmer|artist|composer|license|series|engine|resolution|released|genre|mode|ratings|dspcode|dtkadpcm|channeltype|mode|modes)\ *=\ *.{2,}/gi) {
$skip = 0;
$skip = 0;
$newLine =~ s/^\|(\S*)\ *=\ *(.*)/\|$1 \= $2/i;
$newLine =~ s/^\|(\S*)\ *=\ *(.*)/\|$1 \= $2/i;
Line 468: Line 465:
} elsif (($foundWikipediaInfobox eq 0) and ($foundDolphinInfobox eq 0)) { # We didn't get ANY infoboxes, create a generic one
} elsif (($foundWikipediaInfobox eq 0) and ($foundDolphinInfobox eq 0)) { # We didn't get ANY infoboxes, create a generic one
push (@finalResult, '{{Infobox VG');
push (@finalResult, '{{Infobox VG');
push (@finalResult, '|title = {{SUBPAGENAME}}');
push (@finalResult, '|image = [[File:{{SUBPAGENAME}}.png|300px]]');
push (@finalResult, '|image = [[File:{{SUBPAGENAME}}.png|300px]]');
push (@finalResult, '}}');
push (@finalResult, '}}');