Wikipedia:Bots/Requests for approval/GreenC bot 8
- The following discussion is an archived debate. Please do not modify it. To request review of this BRFA, please start a new section at WT:BRFA. The result of the discussion was Approved.
Operator: GreenC (talk · contribs · SUL · edit count · logs · page moves · block log · rights log · ANI search)
Time filed: 20:10, Tuesday, January 1, 2019 (UTC)
Function overview: Add {{Reflist-talk}}
to candidate talk page sections. Example
Automatic, Supervised, or Manual: Auto
Programming language(s): GNU Awk and BotWikiAwk libraries (not framework)
Source code available: GitHub
Links to relevant discussions (where appropriate): Wikipedia:Bot_requests#Add_Template:reflist-talk and Wikipedia:Village_pump_(proposals)#Bot_to_add_Template:reflist-talk
Edit period(s): one time. Possibly via cron if/when bot shows itself reliable enough with edge cases.
Estimated number of pages affected: 29,000 on first run, much less any later runs
Namespace(s): Talk pages of mainspace pages (ns:1)
Exclusion compliant (Yes/No): Yes
Function details:
The bot first determines if there are references but no <reference/> (or equiv). It then searches each section for <ref></ref> (and again, no <reference/> or equiv) and if a match then adds {{reflist-talk}}
at the end of the section.
Discussion
You've listed "main" as a namespace for this to run in, why would this ever be used in an article? — xaosflux Talk 14:21, 2 January 2019 (UTC)[reply]
- Sorry I meant the talk pages of mainspace pages, fixed. -- GreenC 15:54, 2 January 2019 (UTC)[reply]
This might be me asking a stupid question, but... why? Your link to a discussion is just you saying it should be done; is this (the existence of talk pages without the appropriate {{reflist-talk}} if necessary) an issue that the community is concerned with? Primefac (talk) 18:23, 2 January 2019 (UTC)[reply]
- Added another discussion to VP. -- GreenC 23:04, 2 January 2019 (UTC)[reply]
- GreenC, VPP discussion closed in favor of the proposal :-) ∯WBGconverse 13:51, 9 January 2019 (UTC)[reply]
- Added another discussion to VP. -- GreenC 23:04, 2 January 2019 (UTC)[reply]
Approved for trial (25 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. just to have a few examples of what it would do. Headbomb {t · c · p · b} 21:02, 5 January 2019 (UTC)[reply]
Trial complete. - Special:Contributions/GreenC_bot for January 8. There was one error in Talk:George Fox as it didn't recognize a <nowiki><ref></nowiki>
and added a template where it should not have. This is fixed. I'll be monitoring the first couple thousand fully supervised to catch edge cases like this. -- GreenC 13:50, 9 January 2019 (UTC)[reply]
- Seems to work fine. What happens if two+ different sections have a need of {{ref talk}}? Does it handle both correctly? (You can make a sandbox edit to test.) Headbomb {t · c · p · b} 16:49, 9 January 2019 (UTC)[reply]
- There are some examples in the diffs like Talk:List of semiconductor fabrication plants -- GreenC 17:01, 9 January 2019 (UTC)[reply]
- I notice that in the above talk page it took two edits to add the reflists. If (hypothetically) there were a dozen sections needing {{reflist-talk}}, would the bot need to make a dozen edits? Is it possible to do them all at once? Primefac (talk) 17:12, 9 January 2019 (UTC)[reply]
- There are some examples in the diffs like Talk:List of semiconductor fabrication plants -- GreenC 17:01, 9 January 2019 (UTC)[reply]
- Seems to work fine. What happens if two+ different sections have a need of {{ref talk}}? Does it handle both correctly? (You can make a sandbox edit to test.) Headbomb {t · c · p · b} 16:49, 9 January 2019 (UTC)[reply]
- Ah so that's why I didn't find them. Those should be combined into 1 edit only. Headbomb {t · c · p · b} 17:15, 9 January 2019 (UTC)[reply]
There are pros and cons to that (the advantage of having the edit summary link to multiple sections which becomes a mess with many sections), and it would require a significant rewrite which I don't want to invest for what will be a few hundred edits it's not a common situation. -- GreenC- Alright this wasn't so bad diff. There will be a number after the "Add" like "Add 2 {{reflist}} .. " -- GreenC 18:53, 9 January 2019 (UTC)[reply]
- Ah so that's why I didn't find them. Those should be combined into 1 edit only. Headbomb {t · c · p · b} 17:15, 9 January 2019 (UTC)[reply]
Approved for extended trial (25 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. Headbomb {t · c · p · b} 18:59, 9 January 2019 (UTC)[reply]
Trial complete. - Special:Contributions/GreenC_bot for January 11. It had two edge cases, in Talk:Trinidad and Tobago one of the sections is transcluded which caused different imo broken API output (worked around). In Talk:Sodomy there is {{Template:Reflist}} instead of {{Reflist}} which the program didn't recognize (fixed). Would like to keep going supervised, at least another 500 looking for edge cases. -- GreenC 19:20, 11 January 2019 (UTC)[reply]
- Approved for extended trial (1000 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. -- feel free to stop at 500 edits though. Headbomb {t · c · p · b} 02:49, 12 January 2019 (UTC)[reply]
Trial complete. - Special:Contributions/GreenC_bot for January 12-14 now done about 500 total. A couple more edge cases that are basically gigo situations, fixed or worked around. Let's see.. one was an empty <ref></ref> resulted in an empty ref list, and the other was the section head had a single = instead of == which caused the location of the talk template at the end of the page (which is technically accurate). These are basically gigo. Added an exception for the empty refs but the single = is too difficult to fix. A mystery problem if the section contains a math formula they get mis-encoded by the JSON library and the result is the page is skipped - this does not occur on my home machine so it is something in the Toolforge environment, can't figure out. They are logged and will process on home machine later. Otherwise, working as expected. -- GreenC 02:36, 15 January 2019 (UTC)[reply]
- Do you have the GIGO edits in question? Headbomb {t · c · p · b} 03:14, 15 January 2019 (UTC)[reply]
- Unfortunately, I did not track the article names for those two. In the ref case it left the talk template in the right place but was blank with no ref #s listed. In the single = it left the talk template at the end of the talk page instead of in the (supposed) section, though the ref list had been at the end of the page anyway so it was a wash. The math ones which are not edited yet: Talk:Arthur–Merlin protocol, Talk:Jones calculus, Talk:Clearance (pharmacology) -- GreenC 03:35, 15 January 2019 (UTC)[reply]
- Do you have the GIGO edits in question? Headbomb {t · c · p · b} 03:14, 15 January 2019 (UTC)[reply]
- @GreenC: what if you skip the single =, do those by hand? Headbomb {t · c · p · b} 18:55, 22 January 2019 (UTC)[reply]
- Good idea. Now logged and skipped. Test case shows what it did previously. -- GreenC 20:12, 22 January 2019 (UTC)[reply]
Approved. Headbomb {t · c · p · b} 20:28, 22 January 2019 (UTC)[reply]
- The above discussion is preserved as an archive of the debate. Please do not modify it. To request review of this BRFA, please start a new section at WT:BRFA.