User:AnomieBOT/source/tasks/TemplateReplacer10.pm

parameter to the WikiProject Video games template instead. Unfortunately, this page already uses all three of,  , and   in its WikiProject Video games, so human intervention is required. ~";                           $summary="/* Template:$template removal issue */ Human intervention needed to replace  with ";                            $minor=0;                        }                    }

# Ok, return the new template code now. return ""; });               $outtxt.=$append;

# Need to edit? if($outtxt ne $intxt){ # Post-process to fix # WikiProjectBanners/WikiProjectBannerShell numbering. $outtxt=$self->process_templates($outtxt, sub {                       my $name=shift;                        my @params=@{shift};                        shift; # $wikitext                        shift; # $data                        my $oname=shift;

$name=~s/_/ /g; return undef unless exists($WPB{'Template:'.ucfirst($name)}); my @p_name=; my @p_num=; foreach ($self->process_paramlist(@params)){ if($_->{'name'}=~/^\d+$/){ push @p_num, $_->{'value'} unless $_->{'value'}=~/^\s*$/; } else { push @p_name, $_->{'text'}; }                       }                        for(my $i=0; $i<@p_num; $i++){ push @p_name, ($i+1).'='.$p_num[$i]; }                       return ""; });

$self->warn("$summary in $title\n"); my $r=$api->edit($tok, $outtxt, $summary, $minor, $minor); if($r->{'code'} ne 'success'){ $self->warn("Write failed on $title: ".$r->{'error'}."\n"); next; }               } else { $self->warn("Nothing to do in $title\n"); }

# If we've been at it long enough, let another task have a go. return 0 if time>=$endtime; }       } while(exists($q{'eicontinue'})); }

# No more pages to check, try again in 10 minutes or so in case of errors. return 600; }

1;