User:AnomieBOT/source/tasks/AutoAssessor2.pm: Difference between revisions

Content deleted Content added
AnomieBOT (talk | contribs)
Updating published sources: AutoAssessor2: * Approved!
AnomieBOT (talk | contribs)
Updating published sources: AutoAssessor2 & WikiProjectTagger: * Ability to configure the name of the "auto=yes" parameter for stubs. WikiProjectTagger: * Add support for "marking" categories, to make param adding easier. * Adjust config for upco
Line 42:
# ns => Hash mapping namespace numbers (or 'stub', 'redirect', 'disambig',
# or '' for ns 0) to an array [ $class, $classre, $imp, $impre].
# stubauto => BooleanIf defined, whether to add this "auto=yes" when tagging a stub.
# importance => If specified, this is the name of the "importance" parameter
# instead of "importance".
Line 69:
100 => [ 'portal', qr/portal/i, 'NA', qr/na/i ], # Portal
},
stubauto => 1'auto',
canonicalize => undef,
verify => undef,
Line 92:
 
sub approved {
return -1;
}
 
Line 235:
if(defined($classre) && !grep(/^\s*class\s*=\s*$classre\s*$/s, @params)){
push @params, "class=$class" unless(grep(s/^(\s*class\s*=(?:\s*(?=\S))?).*?(\s*)$/$1$class$2/s, @params));
if(defined($autocfg{'stubauto'})){
pushmy @params, "auto$a=yes" if($cfg{'stubauto'} && !grep(s/^(\s*auto\s*=(?:\s*(?=\S))?).*?(\s*)$/$1yes$2/s, @params));
} else if($auto){
push @params, "$a=yes" grepif(!grep(s/^(\s*auto\Q$a\E\s*=(?:\s*(?=\S))?).*?(\s*)$/$1yes$2/s, @params));
} else {
@params = grep(!/^\s*\Q$a\E\s*=/, @params);
}
}
}