Content deleted Content added
Updating published sources: AccidentalLangLinkFixer, AltLinkTemplateSubster, ShowByDateSubster, TalkTemplateMover: * Move to runner 3. CFDClerk, DatedCategoryCreator, PeerReviewArchiver, POTDPageCreator: * Move to runner 2. |
Updating published sources: POTDPageCreator: * Remove {{tag|noinclude|o}} bits when copying the unprotected version. |
||
Line 51:
my ($self, $api)=@_;
$api->task('POTDPageCreator', 0, 10, qw(d::Talk d::Nowiki d::Trial));
my $trial = $api->check_trial( 1486560586, 'AnomieBOT 77' );
Line 102:
return 60;
}
my $
unless ( $txt=~s/^\s*\Q{{POTD {{{1|{{{style|default}}}}}}\E\s*\n/{{subst:POTD row\n/ ) {▼
# Act like preloading does
$api->warn( "$srcpage doesn't begin with \"{{POTD {{{1|{{{style|default}}}}}}\"!\n$txt" );▼
my ($outtxt,$nowiki) = $api->strip_nowiki($intxt);
$outtxt = join( '', $outtxt=~m!<onlyinclude>(.*?)</onlyinclude>!sg ) if $outtxt=~m!<onlyinclude>.*?</onlyinclude>!s;
$outtxt =~ s!<noinclude>.*?</noinclude>!!sg;
$outtxt =~ s!</?includeonly>!!g;
$outtxt =~ s!<(?:includeonly|noinclude)\s*/>!!g;
$outtxt = $api->replace_nowiki($outtxt, $nowiki);
$api->whine( "[[$srcpage]] has unexpected content", "While attempting to create [[$page]], I found that [[$srcpage]] does not begin with <code><nowiki>{{POTD {{{1|{{{style|default}}}}}}</nowiki></code>. Please fix it, or create [[$page]] manually.", Pagename => $talk );
return 60;
}
$res = $api->edit($tok, $
if($res->{'code'} ne 'success'){
$api->warn("Write for $page failed: " . $res->{'error'});
|