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

Content deleted Content added
AnomieBOT (talk | contribs)
Updating published sources: ArticleCreationGrapher: * Add in support for easily having the bot regenerate all graphs when necessary, e.g. when a new version of gnuplot is installed. * Use that, now that gnuplot on AnomieBOT's server has been upgraded
AnomieBOT (talk | contribs)
Updating published sources: AnomieBOT::Task: * Allow for easy exporting of POSIX::strftime, Time::Local::timegm, and Time::Local::timelocal. * Remove unneeded "use" directives. All tasks, where applicable: * Use the new exports instead of directly us
Line 24:
use Data::Dumper;
use IPC::Open2;
use POSIXAnomieBOT::Task qw/strftime mktime:time/;
use AnomieBOT::Task;
use vars qw/@ISA/;
@ISA=qw/AnomieBOT::Task/;
Line 212 ⟶ 211:
EOH
 
my @t=localtimegmtime $pp[0]{'ts'};
my $end=strftime('%Y-%m', localtime@t);
my $x;
print W "set xtics (";
Line 306 ⟶ 305:
next;
}
@t=localtimegmtime;
$pgdata->{'epoch'}=$epoch;
$pgdata->{'nextrun'}=mktimetimegm(0,0,0,1,$t[4]+1,$t[5]);
$api->store->{$page->{'page'}}=$pgdata;
 
Line 334 ⟶ 333:
 
sub g_tt {
my @t=localtimegmtime shift;
return strftime('%Y-%m', 0,0,0,1,$t[4],$t[5]);
}