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

Content deleted Content added
AnomieBOT (talk | contribs)
Updating published sources: PERTableUpdater: * New task, edits own userspace so no approval needed.
 
AnomieBOT (talk | contribs)
Updating published sources: PERTableUpdater: * Fix metadata, add logging.
Line 7:
=begin metadata
 
Bot: PERTableUpdaterAnomieBOT
Task: PERTableUpdater
BRFA: N/A
Line 253:
$txt.=qq(|}\n);
$txt.=qq(|-\n);
$txt.=qq(|style="text-align:right;font-size:smaller"| Updated as needed. Last updated: <!--TS-->1423:5859, 4 December 2011 (UTC)<!--/TS-->\n);
$txt.=qq(|}</div>);
 
Line 267:
my $intxt=$tok->{'revisions'}[0]{'*'}//'';
$intxt=~s/^\s+|\s+$//;
$intxt=~s#<!--TS-->.*<!--/TS-->#<!--TS-->1423:5859, 4 December 2011 (UTC)<!--/TS-->#g;
if($intxt ne $txt){
$api->log("Upadting $pg ($ct request$s)");
my $r=$api->edit($tok, $txt, "Update table ($ct request$s)", 0, 0);
if($r->{'code'} ne 'success'){