Content deleted Content added
Updating published sources: WikiProjectWorker: * Run complete. |
Updating published sources: WikiProjectWorker: * Start run for WP:WikiProject Film/Marvel Cinematic Universe task force * Some cleanup of the code. d::WikiProjectTagging: * {{tl|WikiProjectBanners}} seems to have been merged with {{tl|WikiProjectBannerShell}} at some point, remove the code that decided between them. |
||
Line 32:
### 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
"Category:Agent Carter (TV series) character redirects to lists" => "WikiProject Television",
"Category:Agent Carter (TV series) episodes" => "WikiProject Television",
"Category:Agent Carter (TV series) images" => "WikiProject Television",
"Category:Agent Carter (TV series) seasons" => "WikiProject Television",
"Category:Agents of S.H.I.E.L.D. character images" => "WikiProject Television",
"Category:Agents of S.H.I.E.L.D. character redirects to lists" => "WikiProject Television",
"Category:Agents of S.H.I.E.L.D. episode redirects to lists" => "WikiProject Television",
"Category:Agents of S.H.I.E.L.D. episodes" => "WikiProject Television",
"Category:Agents of S.H.I.E.L.D. images" => "WikiProject Television",
"Category:Agents of S.H.I.E.L.D. original characters" => "WikiProject Television",
"Category:Agents of S.H.I.E.L.D. posters" => "WikiProject Television",
"Category:Agents of S.H.I.E.L.D. (season 1) episodes" => "WikiProject Television",
"Category:Agents of S.H.I.E.L.D. (season 2) episodes" => "WikiProject Television",
"Category:Agents of S.H.I.E.L.D. (season 3) episodes" => "WikiProject Television",
"Category:Agents of S.H.I.E.L.D. (season 4) episodes" => "WikiProject Television",
"Category:Agents of S.H.I.E.L.D. (season 5) episodes" => "WikiProject Television",
"Category:Agents of S.H.I.E.L.D. (season 6) episodes" => "WikiProject Television",
"Category:Agents of S.H.I.E.L.D. (season 7) episodes" => "WikiProject Television",
"Category:Agents of S.H.I.E.L.D. seasons" => "WikiProject Television",
"Category:Agents of S.H.I.E.L.D.: Slingshot episode redirects to lists" => "WikiProject Television",
"Category:Cloak & Dagger (TV series)" => "WikiProject Television",
"Category:Cloak & Dagger (TV series) episode redirects to lists" => "WikiProject Television",
"Category:Cloak & Dagger (TV series) seasons" => "WikiProject Television",
"Category:Daredevil (TV series) episode redirects to lists" => "WikiProject Television",
"Category:Daredevil (TV series) seasons" => "WikiProject Television",
"Category:Helstrom (TV series) episode redirects to lists" => "WikiProject Television",
"Category:Inhumans (TV series) episode redirects to lists" => "WikiProject Television",
"Category:Iron Fist (TV series) episode redirects to lists" => "WikiProject Television",
"Category:Iron Fist (TV series) images" => "WikiProject Television",
"Category:Iron Fist (TV series) seasons" => "WikiProject Television",
"Category:Jessica Jones (TV series) episode redirects to lists" => "WikiProject Television",
"Category:Jessica Jones (TV series) images" => "WikiProject Television",
"Category:Jessica Jones (TV series) seasons" => "WikiProject Television",
"Category:Luke Cage (TV series) episode redirects to lists" => "WikiProject Television",
"Category:Luke Cage (TV series) images" => "WikiProject Television",
"Category:Luke Cage (TV series) seasons" => "WikiProject Television",
"Category:Marvel Cinematic Universe crossover episodes" => "WikiProject Television",
"Category:Marvel Cinematic Universe episode lists" => "WikiProject Television",
"Category:Marvel Cinematic Universe episode redirects to lists" => "WikiProject Television",
"Category:Marvel Cinematic Universe episodes" => "WikiProject Television",
"Category:Marvel Cinematic Universe seasons" => "WikiProject Television",
"Category:Marvel Cinematic Universe television franchises" => "WikiProject Television",
"Category:Marvel Cinematic Universe television program title cards" => "WikiProject Television",
"Category:Marvel Cinematic Universe television series" => "WikiProject Television",
"Category:Marvel Cinematic Universe television show images" => "WikiProject Television",
"Category:Marvel Cinematic Universe television show logos" => "WikiProject Television",
"Category:Marvel Cinematic Universe television show posters" => "WikiProject Television",
"Category:Marvel's ABC television series" => "WikiProject Television",
"Category:Marvel's Netflix television series" => "WikiProject Television",
"Category:Marvel Studios: Assembled episode redirects to lists" => "WikiProject Television",
"Category:Marvel Studios: Legends episode redirects to lists" => "WikiProject Television",
"Category:Marvel's young adult television series" => "WikiProject Television",
"Category:Runaways (TV series) episode redirects to lists" => "WikiProject Television",
"Category:The Defenders (miniseries)" => "WikiProject Television",
"Category:The Defenders (miniseries) episode redirects to lists" => "WikiProject Television",
"Category:The Falcon and the Winter Soldier" => "WikiProject Television",
"Category:The Falcon and the Winter Soldier character redirects to lists" => "WikiProject Television",
"Category:The Falcon and the Winter Soldier episodes" => "WikiProject Television",
"Category:The Falcon and the Winter Soldier images" => "WikiProject Television",
"Category:The Falcon and the Winter Soldier posters" => "WikiProject Television",
"Category:The Punisher (TV series) episode redirects to lists" => "WikiProject Television",
"Category:The Punisher (TV series) images" => "WikiProject Television",
"Category:The Punisher (TV series) seasons" => "WikiProject Television",
"Category:WandaVision character redirects to lists" => "WikiProject Television",
"Category:B-Class Marvel Cinematic Universe articles" => "WikiProject Film",
"Category:Black Panther (film series) images" => "WikiProject Film",
"Category:Captain America (film series) images" => "WikiProject Film",
"Category:Captain Marvel (film series) images" => "WikiProject Film",
"Category:Category-Class Marvel Cinematic Universe articles" => "WikiProject Film",
"Category:C-Class Marvel Cinematic Universe articles" => "WikiProject Film",
"Category:Doctor Strange (film series) images" => "WikiProject Film",
"Category:Draft-Class Marvel Cinematic Universe articles" => "WikiProject Film",
"Category:FA-Class Marvel Cinematic Universe articles" => "WikiProject Film",
"Category:File-Class Marvel Cinematic Universe articles" => "WikiProject Film",
"Category:FL-Class Marvel Cinematic Universe articles" => "WikiProject Film",
"Category:GA-Class Marvel Cinematic Universe articles" => "WikiProject Film",
"Category:Guardians of the Galaxy (film series)" => "WikiProject Film",
"Category:Guardians of the Galaxy (film series) images" => "WikiProject Film",
"Category:High-importance Marvel Cinematic Universe articles" => "WikiProject Film",
"Category:List-Class Marvel Cinematic Universe articles" => "WikiProject Film",
"Category:Low-importance Marvel Cinematic Universe articles" => "WikiProject Film",
"Category:Marvel Cinematic Universe album covers" => "WikiProject Film",
"Category:Marvel Cinematic Universe amusement rides" => "WikiProject Film",
"Category:Marvel Cinematic Universe articles by importance" => "WikiProject Film",
"Category:Marvel Cinematic Universe articles by quality" => "WikiProject Film",
"Category:Marvel Cinematic Universe brands" => "WikiProject Film",
"Category:Marvel Cinematic Universe character images" => "WikiProject Film",
"Category:Marvel Cinematic Universe character lists" => "WikiProject Film",
"Category:Marvel Cinematic Universe character redirects to lists" => "WikiProject Film",
"Category:Marvel Cinematic Universe characters" => "WikiProject Film",
"Category:Marvel Cinematic Universe crossovers" => "WikiProject Film",
"Category:Marvel Cinematic Universe Did you know articles" => "WikiProject Film",
"Category:Marvel Cinematic Universe effects images" => "WikiProject Film",
"Category:Marvel Cinematic Universe element images" => "WikiProject Film",
"Category:Marvel Cinematic Universe element redirects to lists" => "WikiProject Film",
"Category:Marvel Cinematic Universe features" => "WikiProject Film",
"Category:Marvel Cinematic Universe film images" => "WikiProject Film",
"Category:Marvel Cinematic Universe film posters" => "WikiProject Film",
"Category:Marvel Cinematic Universe film series" => "WikiProject Film",
"Category:Marvel Cinematic Universe ___location redirects" => "WikiProject Film",
"Category:Marvel Cinematic Universe original characters" => "WikiProject Film",
"Category:Marvel Cinematic Universe redirects to lists" => "WikiProject Film",
"Category:Marvel Cinematic Universe task force participants" => "WikiProject Film",
"Category:Marvel Cinematic Universe tie-in comics" => "WikiProject Film",
"Category:Marvel Cinematic Universe video game covers" => "WikiProject Film",
"Category:Marvel Cinematic Universe video games" => "WikiProject Film",
"Category:Mid-importance Marvel Cinematic Universe articles" => "WikiProject Film",
"Category:NA-importance Marvel Cinematic Universe articles" => "WikiProject Film",
"Category:Project-Class Marvel Cinematic Universe articles" => "WikiProject Film",
"Category:Redirect-Class Marvel Cinematic Universe articles" => "WikiProject Film",
"Category:Spider-Man (2017 film series) images" => "WikiProject Film",
"Category:Start-Class Marvel Cinematic Universe articles" => "WikiProject Film",
"Category:Stub-Class Marvel Cinematic Universe articles" => "WikiProject Film",
"Category:Template-Class Marvel Cinematic Universe articles" => "WikiProject Film",
"Category:The Incredible Hulk (film) images" => "WikiProject Film",
"Category:Top-importance Marvel Cinematic Universe articles" => "WikiProject Film",
"Category:Unassessed Marvel Cinematic Universe articles" => "WikiProject Film",
"Category:Unknown-importance Marvel Cinematic Universe articles" => "WikiProject Film",
);
my @cats=keys %catmap;
my @iterators=(
{
Line 488 ⟶ 236:
my $set_empty_importance = 0;
sub copy_importance {
#return ($_[0]->WPBmax($_[2]))[1];
}
# Banner configurations.
my $main_banner='WikiProject
my %banner_cfgs=(
'WikiProject
meta => 0,
canonicalize => 'WikiProject
},
'WikiProject Television' => {
meta => 0,
canonicalize => 'WikiProject Television',
},
);
# Extra parameters (e.g. workgroup).
my @extra_params=( 'mcu=yes' );
my $taggingwith = @extra_params ? '|' . join( '|', @extra_params ) : '';
# Regex fragment to match any aliases of params in @extra_params.
my %extra_param_aliases = ( 'mcu' => qr/MCU/ );
# Possible main banners, usually just $main_banner.
my @main_banners=(
$main_banner,
'WikiProject Television',
);
# Set this to merge these existing banners into $main_banner.
my @merge_banners=();
# Set this to tag WikiProject Biography workgroups in addition to the project's own banner.
my @bio_wg = (
);
Line 527 ⟶ 291:
sub approved {
return
}
Line 605 ⟶ 369:
my ($outtxt,$nowiki)=$api->strip_nowiki($intxt);
my @params=
my $assess = undef;
Line 643 ⟶ 407:
}
my $need_main_banner = ($api->WPBcheck($outtxt,
if(0){
# grr, already redirected so the above always returns true
$need_main_banner=1;
$api->WPBcheck($outtxt, sub {
}
Line 661 ⟶ 425:
my $no_summary = 0;
# Special: Different default parent banner depending on source category.
$main_banner = $catmap{$iter->iterval};
if(@merge_banners){
(undef,$outtxt)=$api->WPBcheck($outtxt, sub {
my $banner=shift;
Line 676 ⟶ 443:
$need_main_banner=0;
return "{{$main_banner}}";
}, @
if(ref($outtxt) eq 'HASH'){
$api->warn("Preprocessing $title failed: ".$outtxt->{'error'}."\n");
Line 746 ⟶ 513:
}
$api->WPBcheck( $outtxt, sub {
@process_banners = ( $main_banner
for my $process_banner (@process_banners)
my $
my $
my $params=shift;
my $wikitext=shift;
my $new=shift;
#return '' if $new;
return undef unless(grep $banner eq $_, @main_banners);
my %cfg=%{$banner_cfgs{$banner}};
my $any=0;
foreach my $p (@params){
next unless $p=~/^(.+?)=(.*)$/;
my ($k,$v)=($1,$2);
my $
$any=1 unless $v eq '';
if($k eq 'class' && exists($cfg{'meta'}) && ($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) && exists($cfg{'meta'}) && ($cfg{'stubauto'}//'')){
push @$params, "$aa=
if(defined($cfg{'canonicalize'})){
my $n=$cfg{'canonicalize'};
$oname=~s/_/ /g;
$oname=~s/^(\s*)\S(?:.*\S)?(\s*)$/$1$n$2/is;
}
my $out="{{$oname";
$out.="|".join("|", @$params) if @$params;
$out.="}}";
return $out;
}, $process_banner, @params);
if(ref($outtxt) eq 'HASH'){
$api->warn("Processing $title failed: ".$outtxt->{'error'}."\n");
next;
}
}
$outtxt=$api->replace_nowiki($outtxt, $nowiki);
Line 844 ⟶ 621:
return 600;
}
1;
</syntaxhighlight>
|