Rosetta Code:Village Pump/Lang-tag bot/Source: Difference between revisions

m
Minor updates.
(Changed to persistently keep track of which pages have been edited and to tag APL. Added to Category:Perl.)
m (Minor updates.)
Line 201:
my $mw = new MediaWiki::API({api_url => 'http://rosettacode.org/mw/api.php'});
$mw->login({lgname => $username, lgpassword => $password})
or die q({Couldn't log in.); (}, $mw->{error}->{code}, ': ',
$mw->{error}->{details}, ')';
 
while (@todo)
Line 259 ⟶ 260:
# indentation is probably intentional (as
# in many J examples).
{my $space = minstr($b =~ /^( +)\S/gm);
$b =~ s/^$space//gm;}
"$t$b\x3c/lang>"}xges;}
Line 278 ⟶ 279:
$lwsl \n )? ) }
{my $t = $1;
my $space = minstr($t =~ /^( +)\S/gm);
$t =~ s/^$space//gm;
$t =~ s/\s+\z//;
Line 302 ⟶ 303:
# If the page was deleted while we were regexing,
# we probably shouldn't resurrect it!
summary => 'Fixed lang tags (automatic edit).'},
{skip_encoding => 1});
# Without the skip_encoding option, non-ASCII characters
Line 308 ⟶ 309:
 
if ($success)
{say(exists 'Committed!';$success->{edit}->{nochange}
? 'Unchanged.'
: 'Committed!');
push @done, $pagetitle;}
else
845

edits