Content deleted Content added
Updating published sources: TFATitleSubpageCreator: * Supplemental BRFA approved |
Updating published sources: TFATitleSubpageCreator: * Update talk page message about a missing subpage, and add checking for the date being missing from Template:TFA title/data.json too. |
||
Line 202:
my $title=$_->{'title'};
my $fa=$title; $fa=~s/^Template:TFA title\//Wikipedia:Today\x27s featured article\//;
$api->whine("Cannot find featured article in [[$fa]]", "Help! I can't find the
$broken = 1;
}
}
my @missingdates=();
@t=gmtime();
@t=@t[3..5];
my $dt;
my $i = 1;
do {
$dt = strftime('%Y-%m-%d', gmtime(timegm(0,0,0,$t[0]+$i,$t[1],$t[2])));
if ( ! defined($json->{'titles'}{$dt}) ) {
my $dt2 = strftime('%B %d, %Y', gmtime(timegm(0,0,0,$t[0]+$i,$t[1],$t[2])));
push @missingdates, "[[Wikipedia:Today's featured article/$dt2|$dt]]";
}
$i--;
} while( $dt ne '2004-02-22' );
if ( @missingdates ) {
$api->whine("Missing dates in [[Template:TFA title/data.json]]", "Help! I seem to have been unable to find the FAs for some dates to enter into [[Template:TFA title/data.json]]. Please add them manually. The missing dates are: " . join( " ", @missingdates ) . ".");
}
|