User:ImplSearchBot/Code: Difference between revisions

m
ImplSearchBot:0
m (ImplSearchBot:0)
m (ImplSearchBot:0)
Line 22:
 
my $posttosite = shift @ARGV;
my $starttime = time;
 
my $pagesedited = 0;
 
print "Creating editor\n";
Line 33 ⟶ 36:
my $remark = shift;
my $minoredit = shift;
 
++$pagesedited;
 
unless( defined $posttosite )
Line 152 ⟶ 157:
# &postpage($pagename, $pagedata, "ImplSearchBot:Updating layout of listing page.",1);
 
# In the future, this should check against a category to see if we've already created this page,
my $omitcategoryname = "Category:$language/Omit";
my $omitcatpagedata = "{{omitcat_head|$language}}";
&postpage($omitcategoryname, $omitcatpagedata, "ImplSearchBot:Updating Omit category body", 0)
unless ( exists $createdomitcategories{$omitcategoryname} );
 
Line 164 ⟶ 168:
# 2. Time last run started
# 3. Time to completion from start to just prior to stat post point.
 
my $runtime = time() - $starttime;
my $statsdata = "Pages edited last run: $pagesedited\nTime to post all per-language updates: $runtime seconds\n";
print "Updating stats page. Runtime ($runtime), Pages edited ($pagesedited)\n";
 
&postpage("User:ImplSearchBot/Stats", $statsdata, 0);
 
 
print "Updating bot code page\n";