Content deleted Content added
Updating published sources: WikiProjectWorker: * Done. |
Updating published sources: d::WikiProjectTagging: * Change the stubauto parameter to be able to represent "auto=yes" or "auto=stub". WikiProjectWorker: * Tag WPBannerMeta banners with "auto=inherit" if assessment is inherited. * Start run for Wik... |
||
Line 33:
### Request link, for edit summary.
my $req="[[User:AnomieBOT/req/WikiProject
### Increment this number every time a new run is started, so we don't have to
### mess around with deleting previous runs' database entries.
my $seq=
### How to find the pages?
my @cats=(
'Category:Animal flight',
'Category:Bioelectrochemistry',
'Category:Biological matter',
'Category:Biomechanics',
'Category:Biophysicists',
'Category:Bird flight',
'Category:Cell adhesion molecules',
'Category:Cell movement',
'Category:Ion channels',
'Category:Locomotion',
'Category:Magnetoception',
'Category:Membrane biology',
'Category:Protein targeting',
'Category:SIGLEC',
'Category:Structural biology',
'Category:Welsh biophysicists',
);
my @iterators=(
{
generator => '
},
);
Line 53 ⟶ 69:
### page to tag (or undef to skip).
sub filter {
return $_[0]->{'title'};
}
Line 60 ⟶ 76:
### How to copy other projects' assessments
sub copy_class {
#return '';
}
sub copy_importance {
#return '';
}
# Banner configurations.
my $main_banner='WikiProject
my @preprocess_templates=(
my %banner_cfgs=(
'WikiProject
meta => 1,
canonicalize => 'WikiProject
},
);
Line 102 ⟶ 117:
sub approved {
return
}
Line 118 ⟶ 133:
$cfg=$api->WPBMetaConfig($cfg->{'meta'}, %$cfg) if exists($cfg->{'meta'});
$cfg{$banner}=$cfg;
$banner_cfgs{$banner}{'stubauto'}=$cfg->{'stubauto'};
}
$api->WPBconfig(%cfg);
Line 187 ⟶ 203:
next;
}
}▼
}
}
if($class eq '' || lc($class) eq lc($assess)){
$class='';
} else {
$assess=undef;
push @params, "class=$class";
my $imp = copy_importance($api, $title, $intxt);
Line 235 ⟶ 254:
return undef if(grep $name eq $_, @main_banners);
push @merge, $oname;
Line 279 ⟶ 297:
my $wikitext=shift;
my $new=shift;
#return '' if $new;
return undef unless(grep $banner eq $_, @main_banners);
Line 293 ⟶ 311:
unshift @$params, "$k=$v" unless(grep(s/^(\s*\Q$k\E\s*=\s*?)(?:\S.*?)?(\s*)$/$1$v$2/s, @$params));
$any=1 unless $v eq '';
if($k eq 'class' && ($cfg{'meta'}//0) && ($cfg{'stubauto'}//'')){
my $aa=$cfg{'stubauto'};
$aa=~s/\s*=.*//;
push @$params, "$aa=inherit" unless(grep(s/^(\s*\Q$aa\E\s*=\s*?)(?:\S.*?)?(\s*)$/$1inherit$2/s, @$params));
▲ }
}
}
if($new && $class && (grep /^class=/, @$params) && ($cfg{'meta'}//0) && ($cfg{'stubauto'}//'')){
my $aa=$cfg{'stubauto'};
$aa=~s/\s*=.*//;
push @$params, "$aa=inherit" unless(grep(s/^(\s*\Q$aa\E\s*=\s*?)(?:\S.*?)?(\s*)$/$1inherit$2/s, @$params));
$any=1;
}
return $wikitext unless $any;
|