Rosetta Code:Village Pump/Lang-tag bot/Source: Difference between revisions
Rosetta Code:Village Pump/Lang-tag bot/Source (view source)
Revision as of 13:02, 20 November 2009
, 14 years agoMinor updates.
Underscore (talk | contribs) (Changed to persistently keep track of which pages have been edited and to tag APL. Added to Category:Perl.) |
Underscore (talk | contribs) 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
$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
{skip_encoding => 1});
# Without the skip_encoding option, non-ASCII characters
Line 308 ⟶ 309:
if ($success)
{say(exists
? 'Unchanged.'
: 'Committed!');
push @done, $pagetitle;}
else
|