Wikipedia:Bots/Requests for approval/Sambot 2


 * The following discussion is an archived debate. Please do not modify it. Subsequent comments should be made in a new section. The result of the discussion was [[Image:Symbol keep vote.svg|20px]] Approved.

Sambot 2
Operator: [[Sam Korn ]] (smoddy)

Automatic or Manually Assisted: Automatic

Programming Language(s): PHP

Function Overview: Per this request, replaces and  with the appropriate fields in the WikiProject banner, adding the banner if necessary.

Edit period(s): One time run.

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

Function Details:

For every article talk page that includes, the bot will


 * ADDED: check for existence of infobox. If an infobox appears to exist, skip this page.
 * remove
 * if is present, migrate it to
 * if is not present, add it
 * add  to
 * if other project banners have article ratings and does not, migrate them

ADDED: Finally, it will post a list of articles that appear to have infoboxes to its user space.

The same procedure will apply for, except with and  as appropriate.

[[Sam Korn ]] (smoddy) 15:59, 23 February 2009 (UTC)

Discussion
Seems like a good task for a bot (IMHO anyhow) - obviously, some testing would be needed to exclude the possibility of exceptions to the rules. (Also, I don't know whether the parameter is auto-assessed or not - if it is, might it also be a good idea - while you were there - to check for the presence of a suitable infobox in the article?) - Jarry1250 (t, c) 17:03, 23 February 2009 (UTC)


 * This is a good point -- it will now check for the apparent presence of an infobox on the corresponding article page. The bot will post a list of pages listed as needing infoboxes but where a infobox appears to exist.  Currently it just looks for the string "infobox" -- if you can think of a better way of detecting this, that would be great.
 * I have done some fairly extensive (read-only) testing and haven't found any exceptions to the regexes I've set up.
 * [[Sam Korn ]] (smoddy) 19:25, 23 February 2009 (UTC)


 * Looking for  in the article would probably work well enough for that part of it. Will your bot correctly handle WPBS and WPB, including the occasional case where someone leaves out the traditional "1="? Have you checked with the projects involved if they want other projects' assessments copied? Anomie⚔ 00:33, 24 February 2009 (UTC)


 * Yep, it's doing a case-insensitive search. Actually, for the football project, there is a fairly short list of the appropriate infoboxes, so I am using that and the   API call.
 * The two shells are both catered for, although I hadn't catered for the redirects. The 1= isn't important in my scanning system (I'll publish the code if it's helpful -- it's a bit of a mess, though).
 * I've checked with the three projects now.
 * [[Sam Korn ]] (smoddy) 11:11, 24 February 2009 (UTC)


 * prop=templates is even better. I would be happy to give the code a once-over. Anomie⚔ 12:08, 24 February 2009 (UTC)


 * If you can email me, I'll send it to you.  [[Sam Korn ]] (smoddy) 12:51, 24 February 2009 (UTC)
 * While we wait ("and the new stuff has been tested *very* extensively"), . - Jarry1250 (t, c) 20:48, 25 February 2009 (UTC)
 * -)  -- no issues other than my accidentally shutting it down halfway through!   [[Sam Korn ]] (smoddy) 21:19, 25 February 2009 (UTC)


 * Just a heads up, Although the top of this page states that the bot has the flag, it appears that it doesn't. Peachey88 (Talk Page 01:12, 27 February 2009 (UTC)
 * Yes, it does. Anomie⚔ 01:54, 27 February 2009 (UTC)
 * 0.o bah didn't think to check the user list compared to the RightsLog link up above. — Preceding unsigned comment added by Peachey88 (talk • contribs)
 * Well, it seems to have the consent of WikiProjects, and it works as described, so there's no reason that it not be . - Jarry1250 (t, c) 08:59, 27 February 2009 (UTC)


 * The above discussion is preserved as an archive of the debate. Please do not modify it. Subsequent comments should be made in a new section.