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

Content deleted Content added
AnomieBOT (talk | contribs)
Updating published sources: TagDater: * Process Category:Wikipedia categories sorted by month too. DatedCategoryCreator: * Use {{tl|Monthly maintenance category}} instead of {{tl|Monthly clean-up category}} where appropriate.
AnomieBOT (talk | contribs)
Updating published sources: DatedCategoryCreator: * Handle Category:Clean-up categories specially.
Line 56:
'Articles containing potentially dated statements' => 31622400,
'Articles that include images for deletion' => 8*86400,
'Clean-up categories' => 31622400,
);
 
Line 155 ⟶ 156:
return $res if $res;
}
}
 
# Part 3: Look for missing dated categories beginning with "Clean-up categories from".
$iter = $api->iterator(
list => 'allcategories',
acprefix => 'Clean-up categories from ',
acprop => 'size|hidden',
aclimit => 'max',
formatversion => 2,
);
while ( my $c = $iter->next ) {
if ( ! $c->{'_ok_'} ) {
$api->warn( "Could not retrieve category list from iterator: " . $c->{'error'} . "\n" );
return 60;
}
next unless $c->{'category'} =~ / $monthre \d{4}$/;
next if $c->{'hidden'} || $c->{'size'} <= 0;
next if exists( $did{$c->{'title'}} );
$did{$c->{'title'}}=1;
$res = $self->make_dated_cat( $api, $c->{'category'}, 'non-empty month' );
return $res if $res;
}