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

Content deleted Content added
AnomieBOT (talk | contribs)
Updating published sources: PageCreator2: * New task, BRFA filed.
 
AnomieBOT (talk | contribs)
Updating published sources: General: * Update for the addition of 'rvslots'. DatedCategoryDeleterTest: * Disable. It's clear that task won't be needed. BrokenRedirectDeleter: * Handle pages with newlines before the <code>#REDIRECT</code>.
 
(5 intermediate revisions by the same user not shown)
Line 1:
{{ombox|type=notice|text= ApprovalApproved requested2010-06-21, Completed 2010-06-22<br />[[Wikipedia:Bots/Requests for approval/AnomieBOT 39]]}}
<sourcesyntaxhighlight lang="perl">
package tasks::PageCreator2;
 
Line 10:
Task: PageCreator2
BRFA: Wikipedia:Bots/Requests for approval/AnomieBOT 39
Status: BRFACompleted 2010-06-22
Rate: Max 6 edits/minute
Created: 2010-06-16
 
Line 40 ⟶ 39:
 
=for info
ApprovalApproved requested2010-06-21, Completed 2010-06-22<br />[[Wikipedia:Bots/Requests for approval/AnomieBOT 39]]
 
=cut
 
sub approved {
return 0-1;
}
 
Line 58 ⟶ 57:
my $endtime=time()+300;
 
my $iter=$api->iterator(generator=>'links',gpllimit=>'100',titles=>'User:Strainu/ro',prop=>'revisions',rvprop=>'content',rvslots=>'main',rvsection=>0);
while(my $page=$iter->next){
if(!$page->{'_ok_'}){
Line 96 ⟶ 95:
}
 
my $txt=$page->{'revisions'}[0]{'slots'}{'main'}{'*'};
my $summary;
if($txt=~$re){
Line 117 ⟶ 116:
return 0 if time()>=$endtime;
}
 
$api->log("Task may be complete!");
 
return 600;
Line 123 ⟶ 124:
1;
 
</syntaxhighlight>
</source>