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 Approved.
Operator: [[Sam Korn]] (smoddy)
Automatic or Manually Assisted: Automatic
Programming Language(s): PHP
Function Overview: Per this request, replaces {{Needs television infobox}}
and {{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 {{Needs television infobox}}
, the bot will
- ADDED: check for existence of infobox. If an infobox appears to exist, skip this page.
- remove
{{Needs television infobox}}
- if
{{TelevisionWikiProject}}
is present, migrate it to{{WikiProject Television}}
- if
{{WikiProject Television}}
is not present, add it - add
needs-infobox=yes
to{{WikiProject Television}}
- if other project banners have article ratings and
{{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 {{Needs football biography infobox}}
, except with {{WPBiography}}
and {{Football}}
as appropriate.
[[Sam Korn]] (smoddy) 15:59, 23 February 2009 (UTC)[reply]
Discussion
[edit]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)[reply]
- 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)[reply]
- Looking for
/{{[iI]nfo[bB]ox/
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)[reply]
- Looking for
- 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)[reply]
- 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 is even better. I would be happy to give the code a once-over. Anomie⚔ 12:08, 24 February 2009 (UTC)[reply]
- If you can email me, I'll send it to you. [[Sam Korn]] (smoddy) 12:51, 24 February 2009 (UTC)[reply]
- While we wait ("and the new stuff has been tested *very* extensively"), Approved for trial (20 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete.. - Jarry1250 (t, c) 20:48, 25 February 2009 (UTC)[reply]
- ;-) Trial complete. -- no issues other than my accidentally shutting it down halfway through! [[Sam Korn]] (smoddy) 21:19, 25 February 2009 (UTC)[reply]
- 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)[reply]
- Yes, it does. Anomie⚔ 01:54, 27 February 2009 (UTC)[reply]
- 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 Approved.. - Jarry1250 (t, c) 08:59, 27 February 2009 (UTC)[reply]
- 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)
- Yes, it does. Anomie⚔ 01:54, 27 February 2009 (UTC)[reply]
- 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.