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

Content deleted Content added
AnomieBOT (talk | contribs)
Updating published sources: General: * BUGFIX: UTF-8 encode all parameters in all API requests * NEW: Persistant storage * NEW: Nowiki/comment handling * NEW: Template search-and-replace * NEW: Mode for BRFA trials * Testing mode should keep going un
AnomieBOT (talk | contribs)
Updating published sources: SourceUploader: * BUGFIX: Just don't allow lines to wrap in the embedded notices, for some reason it breaks when rendered.
Line 1:
{{ombox|type=notice|text=Per [[WP:BOT#Approval]], any bot or automated editing process that only affects only the operators' user and talk pages (or subpages thereof), and which are not otherwise disruptive, may be run without prior approval.}}
affects only the operators' user and talk pages (or subpages thereof),
and which are not otherwise disruptive, may be run without prior
approval.}}
<source lang="perl">
package tasks::SourceUploader;
Line 125 ⟶ 122:
$p=~s/^\s+|\s+$//g;
$t=~s/^\s+# |\s+$//gm;
$t=~s/\s+/ /g;
$top.="\x7b\x7bombox|$p|text=$t\x7d\x7d\n";
}
Line 162 ⟶ 160:
 
my @keys=keys(%{$self->{'pages'}});
return undef unless if(!@keys;){
$self->warn("Terminating task");
return undef;
}
 
$api->task('SourceUploader');