Wikipedia:Bots/Requests for approval/ListasBot 5


 * 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 5
Operator: Matt (talk)

Automatic or Manually Assisted: Automatic

Programming Language(s): C# under AWB

Function Overview: Make fixes to WikiProjectBanners and WikiProjectBannerShell templates.

Edit period(s): continuous

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

Function Details: Tests to see if a given talk page has either the WikiProjectBanners template or the WikiProjectBannerShell templates. If it does, then perform the following items:
 * 1) If blp, activepol (WikiProjectBannerShell only), or collapsed (WikiProjectBannerShell only) are set to "no", remove them.
 * 2) If the "1" parameter is missing, take any parameters that are not name/value pairs and combine them into the "1" parameter.
 * 3) Combine any other numbered parameters (besides 1) into the "1" parameter.
 * 4) Remove any parameters not supported by the template (if consensus exists here to approve that function).

Discussion
This one is by request of Magioladitis here. Apparently inconsistencies in this template can cause problems for the Kingbotk AWB plugin. Matt (talk) 04:09, 30 April 2009 (UTC)
 * Apparently the source code for WikiProjectBanners makes it look like it supports the activepol parameter. Hmmm.  Matt (talk) 04:15, 30 April 2009 (UTC)

There are currently over 95000 pages transcluding those templates, and I see no previous discussion on this matter. Please advertise this request to see if there is really consensus for performing edits with no visible effect to so many pages; I suggest posting at the talk pages of both templates, User talk:Kingbotk/Plugin, WT:AutoWikiBrowser, WP:VPT, and WP:VPR. Anomie⚔ 11:32, 30 April 2009 (UTC) So advertised. Matt (talk) 17:48, 30 April 2009 (UTC)
 * IMO, it would be better to just fix the bugs in the plugin. Anomie⚔ 11:32, 30 April 2009 (UTC)
 * I agree. Mr.Z-man 17:53, 30 April 2009 (UTC)


 * This is more than the bug in fact. I think this job can be done parallel to the job ListasBot does in WikiprojectBiography. My bot (Yobot) crashed very often while editing because of this parameter missing and we are losing time because of that. I expect problems with the missing parameter and with blp=no not to be that huge. I have corrected hundreds of them already manually. As a beginning ListasBot could fix only WPBS containing WPBiography. What has to be done:
 * If actipol=yes in WPBS add the same to WPbiography
 * If actipol=yes in WPbiography add the same to WPBS
 * If actipol <> yes then remove it
 * If blp=yes in WPBS add the same to WPbiography unless living=no is there. Report problem for the last case.
 * If living=yes in WPBiography add the same to WPBS
 * If blp <> yes then remove it
 * Add missing parameter 1= if it's missing.
 * -- Magioladitis (talk) 17:59, 30 April 2009 (UTC)
 * -- Magioladitis (talk) 17:59, 30 April 2009 (UTC)


 * I am only not sure about function 3 described above. 1=, 2=, 3= gives a different visual result of 1=... -- Magioladitis (talk) 18:02, 30 April 2009 (UTC)


 * If ListasBot wants to make those corrections as side effects when editing the talk page for other reasons, I see no problem with that at all. I might even support the maintenance of the blp and activepol parameters as a standalone task. But I don't see the need for a bot to run around potentially editing 95000+ pages and then watching every change to every page transcluding either template, just because an AWB plugin or other bots are buggy. Anomie⚔ 20:32, 30 April 2009 (UTC)
 * I agree with that. That was my initial intension. This work has to be parallel to the other task ListasBot has. Blp and activepol only occur when WPbiography is present as well. -- Magioladitis (talk) 21:40, 30 April 2009 (UTC)
 * If someone is determined to go round editing WPB and WPBS, I have a tweak of my own I'd like made, but I agree that the solution to this immediate problem is not to edit 95,000 pages when one open-source plugin script can instead be fixed. Buggy code should be fixed whether or not the bot runs, as similarly-formatted shells may be added at a later date.  So if the buggy code is fixed, why run the bot in the first place? Happy‑melon 22:13, 30 April 2009 (UTC)


 * I have no problem doing the work in the event that, say, ListasBot 2 has edits to make. However, I felt that the work would have gone above and beyond what we were really intending to do with ListasBot 2, so that's why I filed a new BRfA.  Shall we call this an amended version of ListasBot 2 then? - Matt (talk)


 * Yes, this work has to be done additionally and as a subset of the work approved in BRFA 2. -- Magioladitis (talk) 01:00, 1 May 2009 (UTC)
 * Well then if a BAG member is OK with the procedure Magioladitis outlined being added into ListasBot 2, then consider this BRfA withdrawn. Matt (talk) 02:45, 1 May 2009 (UTC)
 * As a side note, I got sick of AWB and moved all the code into a standalone program...so either way this BRfA goes, it won't be running under AWB. Matt (talk) 17:20, 1 May 2009 (UTC)

Please be sure to list the edits done under this trial when you're done; this could be done by temporarily having the other task skip edits that do not involve this trial and then giving the usual link into the bot's contribs, or by having the bot log the diff urls of edits that involve this trial and then posting that list somewhere onwiki. I'd prefer the former, but either way works. Anomie⚔ 22:35, 2 May 2009 (UTC)
 * One last-minute adddition: I suggest that ListasBot removes "nested=yes" from all templates not just WPBiography. Back in February this parameter was removed from all (hopefully) Wikiproject templates as obsolete. Check here among others-- Magioladitis (talk) 23:12, 2 May 2009 (UTC)
 * It would be much better to actually find out whether all banners are updated, rater than just blindly assuming it to be the case. Anomie⚔ 23:17, 2 May 2009 (UTC)
 * You can check Template talk:WikiProjectBannerShell where it an editor announced that "I am delighted to be able to introduce an exciting (if you're that way inclined, anyway :D) set of tools for handling WikiProject banners on talk pages. The net effect of these new features is to remove the need for the |nested=yes parameter when putting WikiProject banners inside banner shells" and it really works. -- Magioladitis (talk) 23:19, 2 May 2009 (UTC)
 * Please read that entire post. It's not announcing that every banner has been converted, it's announcing that the ability is available and banners can start being converted. It's also about 6 months old. Anomie⚔ 23:21, 2 May 2009 (UTC)
 * After that, I checked many Wikiproject templates myself and I show that nested it's missing. This is a good example. Do you suggest that maybe are leftovers? -- Magioladitis (talk) 23:23, 2 May 2009 (UTC)
 * Exactly. Fortunately, there are not very many non-WPBannerMeta templates left (or else they're not in the appropriate category), so I dumped them all in one page. numbers rating seems to be the only one left, so fix that and we should be good. Anomie⚔ 23:33, 2 May 2009 (UTC)
 * Yes, this template has to be replaced by NumberTalk. I am on it. -- Magioladitis (talk) 23:41, 2 May 2009 (UTC)
 * Note that NumberTalk doesn't currently support class or importance ratings. Anomie⚔ 23:42, 2 May 2009 (UTC)
 * Yes, just noted. I came here to update my comment. I made a comment on the talk page so the code of the Numbers rating is rewritten. Note that there are less than 70 translutions and that ListasBot can temporally add this template as an exception. PS You are faster than me in writing comments!-- Magioladitis (talk) 23:46, 2 May 2009 (UTC)
 * It sometimes helps to be hanging out in #wikipedia-BAG ;) I'm looking forward to this being done so I can remove the nested-handling code from AnomieBOT. Anomie⚔ 23:49, 2 May 2009 (UTC)
 * I think I need an IRC programm or some kind of addon for my FF which I don't have. Anyway, I have a proposed modification in User:Magioladitis/Sandbox. Maybe, we could add some hooks fro comments, etc. Please check and update. -- Magioladitis (talk) 23:56, 2 May 2009 (UTC)
 * Now I understand. Numbers rating is useless. I removed it from all talk pages. We can proceed with nested elimination. -- Magioladitis (talk) 01:28, 3 May 2009 (UTC)

Hello. I spend the day cleaning my room, and I miss out on a lot. All right, time to get to coding. Matt (talk) 02:08, 3 May 2009 (UTC)

Just to be sure I have this down right (and I know I'm going to be rephrasing what's already been said), here's what ListasBot 5's functions will be (and I copied this from ListasBot's user page):
 * ListasBot 5 (in trial): Amended version of ListasBot 2.
 * If a WPBS or WPB template has 'blp=yes', but a WPBiography has 'living=no', report it to User:ListasBot/Reported biography pages.
 * If ListasBot 2 would have made changes to the page, then make the following changes:
 * If a WPBS or WPB has 'activepol=yes', then set 'activepol=yes' in WPBiography, and vice-versa.
 * If a WPBS or WPB has 'activepol=no', remove it.
 * If a WPBS or WPB has 'blp=yes', then set 'living=yes' in WPBiography, and vice-versa.
 * If a WPBS or WPB has 'blp=no', remove it.
 * If a WPBS or WPB has no '1=' parameter, combine all templates that are nested inside the template into the '1=' parameter, separated by line breaks.

...right? Matt (talk) 03:00, 3 May 2009 (UTC)
 * Do actually make the ListasBot 2 changes. Anomie⚔ 03:02, 3 May 2009 (UTC)
 * Yup. Matt (talk) 04:30, 3 May 2009 (UTC)
 * Oops, forgot to add "remove nested from all templates". I'm assuming that one is also being done only if the page is being edited for some other reason?  So, that means we would have:


 * ListasBot 5 (in trial): Amended version of ListasBot 2.
 * If a WPBS or WPB template has 'blp=yes', but a WPBiography has 'living=no', report it to User:ListasBot/Reported biography pages.
 * If ListasBot 2 would have made changes to the page, then make the following changes:
 * If a WPBS or WPB has 'activepol=yes', then set 'activepol=yes' in WPBiography, and vice-versa.
 * If a WPBS or WPB has 'activepol=no', remove it.
 * If a WPBS or WPB has 'blp=yes', then set 'living=yes' in WPBiography, and vice-versa.
 * If a WPBS or WPB has 'blp=no', remove it.
 * If a WPBS or WPB has no '1=' parameter, combine all templates that are nested inside the template into the '1=' parameter, separated by line breaks.
 * Remove any instances of "nested" from any other templates.

Matt (talk) 09:25, 3 May 2009 (UTC)

Ok, well if this is going ahead, I might as well put my chip in. I would like to suggest the following: This won't, at that point, be a visible change. However, it's my eventual ambition to be able to merged and WPB, and the most significant objection to that is that doing so will cause all WPB templates, some of which have large numbers of banners in them, to expand to the WPBS format. Usually there's nothing justifiably wrong with that, if there are only three or four banners in the shell it's really not worth crying over. But if there are ten banners in the shell it's a legitimate complaint. The new banner nesting code I introduced resolved the major issue: when making that switch, the banners that are currently uncollapsed inside WPB will automatically collapse themselves when moved to a WPBS-style shell, but I can't do it the other way around. But if the yes parameter was in place on the longer WPB templates, then when the switch is made, they will be exempt from the change in style. Of course, we need a suitable value for X; I'd put it at around 6. Thoughts? Happy‑melon 11:49, 3 May 2009 (UTC)
 * If a banner using has more than X banners within it, set the yes parameter in WPB.
 * I don't have a problem doing this. As an alternative, could this be implemented in the template itself?  Matt (talk) 19:16, 3 May 2009 (UTC)
 * How? If it can be, I'd much rather implement it centrally, but how is the shell supposed to know how many banners are inside it? Happy‑melon 20:38, 3 May 2009 (UTC)
 * Well, you just...oh. Hrm.  Matt (talk) 04:30, 4 May 2009 (UTC)

Ok, had to make a few bug fixes along the way. Here's the results. All trial edits are marked with "ListasBot 5 trial run".
 * If a WPBS or WPB template has 'blp=yes', but a WPBiography has 'living=no', report it to User:ListasBot/Reported biography pages.
 * 1 2
 * If ListasBot 2 would have made changes to the page, then make the following changes:
 * If a WPBS or WPB has 'activepol=yes', then set 'activepol=yes' in WPBiography, and vice-versa.
 * WPBio→WPBS: no examples
 * WPBS→WPBio: 1 2 3
 * If a WPBS or WPB has 'activepol=no', remove it.
 * 1
 * If a WPBS or WPB has 'blp=yes', then set 'living=yes' in WPBiography, and vice-versa.
 * WPBio→WPBS: 1 (fixed in 2) 3 4 5 6 7 8
 * WPBS→WPBio: 1 (although this one may have been more because the article was a member of Category:Living people)
 * If a WPBS or WPB has 'blp=no', remove it.
 * 1 2
 * If a WPBS or WPB has no '1=' parameter, combine all templates that are nested inside the template into the '1=' parameter, separated by line breaks.
 * 1 2 3 4 5 6
 * Remove any instances of "nested" from any other templates.
 * 1 (2 and 3 were ones I had the bot redo while I tried to figure out why it edited the page in the first place) 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
 * I don't particularly like the whitespace layout, with the blp and 1 parameters on their own lines. Maybe it's just personal preference, but I think they're better all together on the same line. A linebreak was removed in 5.1 and 3.6. Other than that it looks pretty good. Happy‑melon</b> 07:52, 4 May 2009 (UTC)
 * I would also prefer 1 to be in the same line with blp, but that's not important. I can't wait to see the bot running. -- Magioladitis (talk) 17:59, 4 May 2009 (UTC)
 * Ok, how's this? Matt (talk) 22:40, 4 May 2009 (UTC)
 * That's much better. It shouldn't be too difficult to add a touch of indentation, do you think? As in, one space before each of the parameters in the WPBiography template, leaving the opening and closing braces unindented.  Or am I being picky? :D <b style="color:forestgreen;">Happy</b>‑<b style="color:darkorange;">melon</b> 23:11, 4 May 2009 (UTC)
 * Like this? The only problem I see with this is that only WPBS/WPB and WPBiography templates would be handled correctly.  I try not to screw with other WikiProject templates any more than I have to.  Matt (talk) 23:30, 4 May 2009 (UTC)
 * Well...on second thought, it actually may not be that hard to do. Matt (talk) 23:48, 4 May 2009 (UTC)
 * Ugh. Personally, I prefer to see each banner template on one line whenever that makes sense, instead of stretching each one over 5 or 6 lines... Anomie⚔ 01:14, 5 May 2009 (UTC)
 * In certain situations, I agree with you. I don't agree in the case of WPBS templates, so my default here is to put line breaks in, in between the templates that are enclosed within.  WPBiography also has line breaks inserted as precedent with ListasBot 2.  As far as other templates, the bot was coded such that they are only line broken if they were already line broken beforehand.  This works well in situations where, for example, where someone put comments in after the value of a parameter (seems to happen quite a bit with WPMILHIST for some reason).  Matt (talk) 02:00, 5 May 2009 (UTC)
 * What KingbotK plugin does and I like is the following: If WPBiography is outside the WPBS then it stretches it to one line per parameter, if it is in the WPBS then it keeps it in one line. I really don't like the one extra space before each of the parameters. -- Magioladitis (talk) 07:59, 5 May 2009 (UTC)
 * Ok, I think I need to stop being so much of a people pleaser here. The state of the code right now, as of my last revision, is that it will split a WikiProject banner into multiple lines if it detects any line breaks inside the banner to begin with.  It will also insert line breaks in between each banner in a banner shell.  It will also do indentation (this especially makes banner shells easier to read).  I think I'm going to leave it at that.  Matt (talk) 22:47, 5 May 2009 (UTC)
 * Curses, he's discovered our nefarious scheme! That schema sounds perfectly fine, and many thanks for your help so far.  I agree that at some point it has to move away from the "ooh can it do this?" stage and into actual production. <b style="color:forestgreen;">Happy</b>‑<b style="color:darkorange;">melon</b> 07:38, 6 May 2009 (UTC)
 * LOL. I think now ListasBot can start. -- Magioladitis (talk) 08:03, 6 May 2009 (UTC)
 * ...please? :-P Matt (talk) 08:12, 6 May 2009 (UTC)

I'd feel better with another set of examples. – Quadell (talk) 17:26, 6 May 2009 (UTC)

Sheesh, 49,689 pages, and only 100 of them had anything good. I won't bother posting links to every edit here this time, but I'll put the statistics below. I did make a couple of minor formatting fixups along the way.

Percentage of pages which received specified edits:
 * Remove *.nested: 95%
 * If WPBiography.living=yes, set WPBS.blp=yes: 11%
 * If WPBS.living=yes, set WPBiography.living=yes: 3%
 * If WPBS.1 does not exist, add it: 3%
 * If WPBS has 6 or more banners, set WPBS.collapsed=yes: 3%
 * If WPBS.blp=no, remove it: 2%
 * The bot did not edit for any of the following criteria:
 * If WPBS.blp=yes and WPBiography.living=no, report it to User:ListasBot/Reported biography pages.
 * If WPBiography.activepol=yes, set WPBS.activepol=yes.
 * If WPBS.activepol=yes, set WPBiography.activepol=yes.
 * If WPBS.activepol=no or WPBiography.activepol=no, remove it.

Edits look great. – Quadell (talk) 13:19, 8 May 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.