Wikipedia:Bots/Requests for approval/Sambot 13

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by DeFaultRyan (talk | contribs) at 14:50, 6 May 2009 (so far, so good). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Operator: [[Sam Korn]] (smoddy)

Automatic or Manually Assisted:

Programming Language(s): PHP, using Pillar

Function Overview: WikiProject article-assessment

Edit period(s): As needed

Already has a bot flag (Y/N): Y

Function Details: Automatically fill in article ratings in WikiProject banners taking information from, in order:

  • Are there existing ratings we can copy? If so, use the highest one.
  • Is the article a redirect?
  • Is the article in any stub categories?
  • Is the article in Category:All disambiguation pages?

The task currently in mind is this request, but I am going to ask for approval for doing this with any WikiProject banner upon request, as it's a standard and fairly simple task.

Code available here. Thanks to Anomie for his suggestion re disambiguations.

[[Sam Korn]] (smoddy) 16:28, 5 May 2009 (UTC)[reply]

Discussion

A few comments on the code:

  • You convert the values gotten from the other templates to lowercase, so in_array("FA", $classes) and the like won't ever match.
  • It looks like you'll only process the first 500 articles in the category, as you don't even get the $continue from get_categorymembers.

Anomie 21:12, 5 May 2009 (UTC)[reply]

Oops. Fixed. Thanks. [[Sam Korn]] (smoddy)
Approved for trial (30 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. Anomie 01:13, 6 May 2009 (UTC)[reply]

Trial complete. 30 edits [[Sam Korn]] (smoddy) 09:25, 6 May 2009 (UTC)[reply]

Looks good so far. DeFaultRyan 14:50, 6 May 2009 (UTC)[reply]