Content deleted Content added
Updating published sources: General: * New task, PageCreator. |
Updating published sources: SourceUploader: * Sort directory pages by last modified date. * Use <nowiki><syntaxhighlight></nowiki> instead of <nowiki><source></nowiki>. d::NoWiki: * Add support for <nowiki><syntaxhighlight></nowiki>. General: * Vario |
||
(6 intermediate revisions by the same user not shown) | |||
Line 1:
{{ombox|type=notice|text=
<
package tasks::PageCreator;
Line 7:
=begin metadata
Bot: AnomieBOT
Task: PageCreator
BRFA: Wikipedia:Bots/Requests for approval/AnomieBOT 32
Status:
Created: 2009-06-19
OnDemand: true
Line 118:
'Seaborgium' => [ 258, 273 ],
'Bohrium' => [ 260, 275 ],
'
'Meitnerium' => [ 265, 279 ],
'Darmstadtium' => [ 267, 281 ],
Line 141:
=for info
=cut
sub approved {
return
}
Line 162:
for(my $iso=$range->[0]; $iso<=$range->[1]; $iso++){
my $title="$element-$iso";
next if exists($api->store->{$title});
my $redir="Isotopes of ".lc($element)."#$element-$iso";
my $page=sprintf("#REDIRECT [[Isotopes of %s#%s-%d]]\n\n[[Category:Isotopes of %s|%s-%0*d]]", lc($element), $element, $iso, lc($element), $element, $l, $iso);
# Ok, check the page
my $tok=$api->edittoken($title, EditRedir => 1);
if($tok->{'code'} eq 'shutoff'){
$api->warn("Task disabled: ".$tok->{'content'}."\n");
Line 177 ⟶ 178:
if(!exists($tok->{'missing'})){
$api->log("$title already exists, skipping");
$api->store->{$title}=1;
next;
}
Line 188 ⟶ 190:
next;
}
$api->store->{$title}=1;
# If we've been at it long enough, let another task have a go.
Line 199 ⟶ 202:
1;
</syntaxhighlight>
|