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

Content deleted Content added
AnomieBOT (talk | contribs)
Updating published sources: AnomieBOT::API: * Add configuration variable (and accessor function) for the bot operator's username * Better logging when testing uploads All tasks: * Remove useless metadata field
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>.
 
(One intermediate revision by the same user not shown)
Line 1:
{{ombox|type=notice|text= Approved 2010-06-21, Completed 2010-06-22<br />[[Wikipedia:Bots/Requests for approval/AnomieBOT 39]]}}
<sourcesyntaxhighlight lang="perl">
package tasks::PageCreator2;
 
Line 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 95:
}
 
my $txt=$page->{'revisions'}[0]{'slots'}{'main'}{'*'};
my $summary;
if($txt=~$re){
Line 124:
1;
 
</syntaxhighlight>
</source>