Wikipedia:Bots/Requests for approval/Sambot 2


Sambot 02

[[User:Sambot|Sambot 2]]

{{Newbot|Sambot}}

Operator: [[Sam Korn]] (smoddy)

Automatic or Manually Assisted: Automatic

Programming Language(s): PHP

Function Overview: [http://en.wikipedia.org/w/index.php?title=Wikipedia:Bot_requests&oldid=272701890#Needs_X_Infobox Per this request], replaces {{tlx|Needs television infobox}} and {{tlx|Needs football biography infobox}} 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 {{tlx|Needs television infobox}}, the bot will

  • ADDED: check for existence of infobox. If an infobox appears to exist, skip this page.
  • remove {{tlx|Needs television infobox}}
  • if {{tlx|TelevisionWikiProject}} is present, migrate it to {{tlx|WikiProject Television}}
  • if {{tlx|WikiProject Television}} is not present, add it
  • add needs-infobox=yes to {{tlx|WikiProject Television}}
  • if other project banners have article ratings and {{tlx|WikiProject Television}} 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 {{tlx|Needs football biography infobox}}, except with {{tlx|WPBiography|sports-work-group=yes}} and {{tlx|Football}} 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 /{{[iI]nfo[bB]ox/ in the article would probably work well enough for that part of it. Will your bot correctly handle {{tl|WPBS}} and {{tl|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 prop=templates 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"), {{BotTrial|edits=20}}. - Jarry1250 (t, c) 20:48, 25 February 2009 (UTC)

::{{mono|;-)}} {{BotTrialComplete}} -- 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 | Contribs) 01:12, 27 February 2009 (UTC)

:: [http://en.wikipedia.org/w/index.php?title=Special%3AListUsers&username=Sambot&limit=1 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 (talkcontribs)

::::Well, it seems to have the consent of WikiProjects, and it works as described, so there's no reason that it not be {{BotApproved}}. - 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.