Wikipedia:Bots/Requests for approval/ListasBot 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 Symbol keep vote.svg Approved.

ListasBot 2
Operator: Matt (talk)

Automatic or Manually Assisted: Automatic

Programming Language(s): C#

Function Overview: Cleanup to pages using the WPBiography template.

Edit period(s): On-demand, but would probably run near-continuous for about a week at a time

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

Function Details: As requested by User:Magioladitis here. ListasBot would remove the "nested" parameter from any WPBiography banners, as well as change any "importance" parameters over to "priority" parameters (again, only in the WPBiography banners). It would run concurrently with ListasBot's already approved functions (traversing Category:Biography articles without listas parameter), and once completed with that list, it would be assigned to do the same thing to Category:Biography articles with listas parameter -- thus touching all biography articles at least once.

Added 4/12/09: ListasBot would also add "living=yes" to the WPBiography template if the article (or its talk page) is a member of Category:Living people or Category:Possibly living people.

Added 4/13/09: ListasBot adds "priority=" to articles that are missing a priority or importance parameter, and removes the "needs-infobox" and "needs-photo" parameters where they are empty or set to "no". It removes any parameters from the template that are not listed in Template:WikiProject Biography/doc. It also reorders all the parameters in the template to match the listing at Template:WikiProject Biography/doc, but only if it would have made other changes to the page.

Added 4/14/09: ListasBot has a hardcoded list of the parameters usable by WPBiography, taken from Template:WikiProject Biography/doc. Any parameter where the documentation says "Set this to 'yes' or remove it" is removed if it is blank or "no", plus a few extras as requested by User:Magioladitis.

Discussion
– Quadell (talk) 17:49, 13 April 2009 (UTC)
 * I think this is useful. But are there other things your bot could do as well, while you're fixing WPBio templates? Perhaps keep a list of those bios where the DefaultSort is different than the listas, for human checking? Or adding living=yes when the article has the category:living_people, or living=no where the article has category:x_deaths? It's going to make an edit to a ton of articles, so you might as well do as much good as you can while you're there, right? – Quadell (talk) 14:16, 11 April 2009 (UTC)
 * Articles lacking the living parameter are located in Category:Biography articles without living parameter and Yobot already does that. There are at about 55,000 articles in there out of 650,000 articles transcluding WPBiography. I can give Matt my false positives list and instructions how to deal with the living parameter, but I think that the subject is already handled ok. -- Magioladitis (talk) 15:34, 11 April 2009 (UTC)
 * Rethinking a bit, I can propose the following: If Category:Living people or Category:Possible living people exists then add "living=yes" in the WPBiography. I think this can be done by ListasBot. xxxx deaths is not safe since the article may be about a couple. -- Magioladitis (talk) 17:36, 11 April 2009 (UTC)
 * Is there a function available in AWB that can test to see if a page is a member of a certain category, other than just searching for the text "" in the article? WikiFunctions.dll isn't very well documented...  Matt (talk) 21:37, 11 April 2009 (UTC)
 * Well, I think I figured out a way to do it. It's not the best method by any stretch of the imagination, but it should work safely.  The method basically involves fetching an HTML version of both the article in question and the article's talk page, and looking for the category listing there.  So, I guess we can add this on to what ListasBot 2 will be doing.  Matt (talk) 09:07, 12 April 2009 (UTC)
 * As far as DEFAULTSORT vs. listas, ListasBot is already set up to discard the DEFAULTSORT tag. When WPBiography has a listas parameter, it transcludes DEFAULTSORT, so this was done to prevent a situation later on where an editor might change one value and not the other, and thus set up a DEFAULTSORT conflict.  It also brings any listas tags in any other templates into sync with each other.  However, the list of pages where they are different already exists at Category:Pages with DEFAULTSORT conflicts.  Matt (talk) 17:25, 11 April 2009 (UTC)

Before starting one more tiny addition: If there is no "priority" parameter, then add an empty priority parameter ("|priority=") after the "class" parameter exactly as KingbotK plugin does. This is useful to encourage people of WPBiography to assess articles. -- Magioladitis (talk) 18:08, 13 April 2009 (UTC)

Bot performed as expected. Magioladitis's request for the priority parameter was included in this trial. Had to make a change partway through to handle situations (such as this one) where there are duplicate parameters in the template, so that if one instance had a value attached to it and the other didn't, the instance that had a value attached to it got saved. Also modified the code to rearrange all the parameters so that they are in the same order as is listed in Template:WikiProject Biography/doc (which is how I made sure that "priority" would be listed after "class") and to discard duplicate instances of parameters in a template -- but only if the bot was going to make changes to the page anyway. -- Matt (talk)
 * Can you also delete the parameters "needs-photo=" and "needs-infobox" where the are empty and/or tagged with "no"? (I hope you don't hate me with all these requests!). I checked the edits. They look wonderful. -- Magioladitis (talk) 00:39, 14 April 2009 (UTC)
 * Aargh! So many requests!  My head is going to explode!  hehehe, just kidding.  Done.  Matt (talk) 01:09, 14 April 2009 (UTC)


 * Going through the list, it looks like most edits simply added a blank "|priority=" parameter. In fact, I can't find any that do anything else. Could you find or run some examples that remove the "nested" param, change "importance" to "priority", add "living=yes", and/or remove "needs-infobox" and "needs-photo" params? I'll want to see each of these working before I know it's passed the test. – Quadell (talk) 07:39, 14 April 2009 (UTC)
 * Sorry, I went through and fixed a bunch of articles in assisted editing mode while this BRfA was awaiting any sort of approval, and I forgot to prune the list and remove the ones I did before I started my trial. I hope I'm not totally out of line by extending my trial a little bit more to give you the examples you asked for.  But, here they are: 1 2 3 4 5 6 7 6 (this last one is from an assisted editing test done on my own account, but the current code should do the same thing)  Matt (talk) 08:28, 14 April 2009 (UTC)
 * Also this looks like a bug. – Quadell (talk) 07:39, 14 April 2009 (UTC)
 * I don't know that I'd so much call it a bug -- if you look at the original version, there were two listas parameters in the template. The bot simply picked out the first one.  However, it has been addressed, see here.  Matt (talk) 08:28, 14 April 2009 (UTC)
 * KingbotK plugin would call it "bad tag" and open it in the browser. I am ok either way. Btw, "small" and "auto" have to be treated the same way as "needs-infobox". If they aren't "yes", they should be removed. -- Magioladitis (talk) 08:36, 14 April 2009 (UTC)
 * Done. Good thing you said something -- I didn't even know about the "auto" parameter until you mentioned it.  Anywho, I went through Template:WikiProject Biography/doc, and did the same thing with any of the parameters where they said "set this to 'yes' or delete it".  I'll throw you this and this as samples.  Matt (talk) 09:22, 14 April 2009 (UTC)
 * You rock. Let's wait for Quadell or another BAG member if you need another bunch of trials or you can start. -- Magioladitis (talk) 09:45, 14 April 2009 (UTC)

I went through the edits and I like what I see. I'm going to give it a couple days before approval, in case someone else sees a problem I didn't. (Magioladitis still found a good suggestion for improvement just this morning.) – Quadell (talk) 14:30, 14 April 2009 (UTC)

Looks good. – Quadell (talk) 16:14, 16 April 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.