Content deleted Content added
Updating published sources: DatedCategoryCreater: * Ahhh! Accidentally left some testing code in place. Sorry everyone. |
Updating published sources: DatedCategoryCreator: * Allow certain cats to have backdated dates (currently just Category:Wikipedia articles in need of updating). TagDater: * Don't check years in missingcats logic, due to the above change. |
||
Line 43:
my %skipcat=(
'Articles with invalid date parameter in template' => 1
);
# Categories to allow old dates
my %oldcats=(
'Wikipedia articles in need of updating' => 1
);
Line 55 ⟶ 60:
}
my $
sub new {
Line 87 ⟶ 92:
my %did=();
my
my $curmonth=strftime('%B %Y', @t);
$
# Part 1: Create needed categories for the current month
Line 136 ⟶ 140:
for my $c (@{$p->{'categories'} // []}) {
# Minimal sanity check; make_dated_cat() will do more
next unless $c->{'title'}=~/ $monthre
next if exists($did{$c->{'title'}});
$did{$c->{'title'}}=1;
Line 167 ⟶ 171:
my $txt='{{Monthly clean up category';
$parent=~s/^Category://;
$parent=~s/($monthre) (
my ($m,$y)=($1,$2);
if(exists($rcatmap{$parent})){
Line 176 ⟶ 180:
return 0 if exists($skipcat{$parent});
}
return 0 if $y>$curyear;
return 0 if(!exists($oldcats{$parent}) && $y<2004);
$txt.='}}';
|