Wikipedia:Bots/Requests for approval/Addbot 28
- 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: Addshore (talk · contribs · SUL · edit count · logs · page moves · block log · rights log · ANI search)
Time filed: 04:27, Wednesday January 9, 2013 (UTC)
Automatic, Supervised, or Manual: Automatic
Programming language(s): PHP
Source code available: On Request
Function overview: Removing Template:Sections from pages with more than 2 sections (not including see also, external links and references)
Links to relevant discussions (where appropriate):
Edit period(s): weekly
Estimated number of pages affected: a small amount per run
Exclusion compliant (Yes/No): yes
Already has a bot flag (Yes/No): yes
Function details: As above. Removing Template:Sections from pages with more than 2 sections (not including see also, external links and references). Open to discussion.
Discussion
[edit]What about to ignore 'Notes', 'Bibliography' and 'Further Reading'? mabdul 07:35, 9 January 2013 (UTC)[reply]
- They would also be ignored. I will create a regex to match as many such headings that I know exist. ·Add§hore· Talk To Me! 11:45, 9 January 2013 (UTC)[reply]
Seems like a useful task and a trusted bot operator. No objections to trial for this one. Vacationnine 14:42, 9 January 2013 (UTC)[reply]
How does the bot know 3+ sections means there is no further need to split into sections? A long article can have several sections that all need to be split and organized, like [1]. (Furthermore, what if article needs further {{Sub-sections}} cleanup?) — HELLKNOWZ ▎TALK 14:49, 9 January 2013 (UTC)[reply]
- The bot could have a ratio of sections to article size. Minimum being 3 required sections not including those mentioned above. The ration could be determined after looking at articles currently tagged with the tag. {{Sub-sections}} would be ignored. Bot would listen to {{nobots}} if there ever happened to be a 'special case' ·Add§hore· Talk To Me! 23:34, 9 January 2013 (UTC)[reply]
- If I were a BAGer, I would approve for trial for 10 edits to see how it performs.—cyberpower ChatOffline 15:10, 10 January 2013 (UTC)[reply]
- After writing the code it may even be worth running a dummy run to produce a report of what it would have edited and the ratios of sections to content e.t.c ·Add§hore· Talk To Me! 15:11, 10 January 2013 (UTC)[reply]
- That would definitely give me more insight to how this task would run. If you can do it, please do so.—cyberpower ChatOffline 15:18, 10 January 2013 (UTC)[reply]
- After writing the code it may even be worth running a dummy run to produce a report of what it would have edited and the ratios of sections to content e.t.c ·Add§hore· Talk To Me! 15:11, 10 January 2013 (UTC)[reply]
- Approved for trial (25 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. MBisanz talk 19:56, 10 January 2013 (UTC)[reply]
- Comment. Coding ·Add§hore· Talk To Me! 09:36, 11 January 2013 (UTC)[reply]
- Code done, I ran it for the first 50 pages found and the results showing sections (excluding those listed above) against page size is here ·Add§hore· Talk To Me! 14:24, 11 January 2013 (UTC)[reply]
- After looking at the table and adding the ratios of sections to content I think allowing a size of 2750 per section is a good boundary. Any comments would be appreciated. ·Add§hore· Talk To Me! 14:34, 11 January 2013 (UTC)[reply]
- Trial complete. Please see these edits. I have looked through them and they all look good. I am also going to add another bit of functionality to the bot that will produce a report at User:Addbot/log/sections of any edits just above the 2750 threshold, so 2750 TO 3250 that other editors can look at and manually check. ·Add§hore· Talk To Me! 14:52, 11 January 2013 (UTC)[reply]
- Could you use a little bit more descriptive edit summary? Specifically, it does not say why it is "removing sections tag".
- Does the threshold apply to the average per section or per each section? What I mean is, if there are section with 100, 100, 100, 100, and 10000, will it remove the tag? — HELLKNOWZ ▎TALK 15:02, 11 January 2013 (UTC)[reply]
- Would "Removing sections tag (Average section size $size)" be better? Currently the script looks at the average across all of the sections although making it look at each section individually would not be hard. This could possibly also mean that the section size the script currently looks for could be increased. ·Add§hore· Talk To Me! 15:05, 11 January 2013 (UTC)[reply]
- I meant something humanly readable, like "Removing sections tag, as there are 6 sections in the article (average size 2437)" or something. My worry with averaging across section is that one superlong section can screw it up. It's possible the tag was placed exactly because that unruly section was there. — HELLKNOWZ ▎TALK 15:10, 11 January 2013 (UTC)[reply]
- I have produced another report which also shows the size of the largest section (including the lead). Now just to determine what extra rule to look at. The bot now also looks at the largest section rather than the average. ·Add§hore· Talk To Me! 17:21, 11 January 2013 (UTC)[reply]
- Looking at the report a largest section size of 5000 seems about right. I am also going to add a check to the bot to make sure it does not remove a {{sections}} template from below a header. Instead it will convert it to {{Sub-sections}}. ·Add§hore· Talk To Me! 17:27, 11 January 2013 (UTC)[reply]
- {{BAGAssistanceNeeded}} ·Add§hore· Talk To Me! 05:11, 13 January 2013 (UTC)[reply]
- As mentioned, when a single section exceeds a large number of characters (I would say 10k+), it's probably best to skip that page, because the tag may have been placed for that section specifically, even if not in the correct place (i.e. generic TW tagger). — HELLKNOWZ ▎TALK 20:53, 13 January 2013 (UTC)[reply]
- After looking at the list generated by the bot I think I would leave the size to skip at 5000 currently. Although maybe in the future this threshold could be changed. ·Add§hore· Talk To Me! 20:56, 13 January 2013 (UTC)[reply]
- Looking at the report a largest section size of 5000 seems about right. I am also going to add a check to the bot to make sure it does not remove a {{sections}} template from below a header. Instead it will convert it to {{Sub-sections}}. ·Add§hore· Talk To Me! 17:27, 11 January 2013 (UTC)[reply]
- I have produced another report which also shows the size of the largest section (including the lead). Now just to determine what extra rule to look at. The bot now also looks at the largest section rather than the average. ·Add§hore· Talk To Me! 17:21, 11 January 2013 (UTC)[reply]
- I meant something humanly readable, like "Removing sections tag, as there are 6 sections in the article (average size 2437)" or something. My worry with averaging across section is that one superlong section can screw it up. It's possible the tag was placed exactly because that unruly section was there. — HELLKNOWZ ▎TALK 15:10, 11 January 2013 (UTC)[reply]
- Would "Removing sections tag (Average section size $size)" be better? Currently the script looks at the average across all of the sections although making it look at each section individually would not be hard. This could possibly also mean that the section size the script currently looks for could be increased. ·Add§hore· Talk To Me! 15:05, 11 January 2013 (UTC)[reply]
- Trial complete. Please see these edits. I have looked through them and they all look good. I am also going to add another bit of functionality to the bot that will produce a report at User:Addbot/log/sections of any edits just above the 2750 threshold, so 2750 TO 3250 that other editors can look at and manually check. ·Add§hore· Talk To Me! 14:52, 11 January 2013 (UTC)[reply]
- After looking at the table and adding the ratios of sections to content I think allowing a size of 2750 per section is a good boundary. Any comments would be appreciated. ·Add§hore· Talk To Me! 14:34, 11 January 2013 (UTC)[reply]
- Code done, I ran it for the first 50 pages found and the results showing sections (excluding those listed above) against page size is here ·Add§hore· Talk To Me! 14:24, 11 January 2013 (UTC)[reply]
Approved for extended trial (50 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. — HELLKNOWZ ▎TALK 21:11, 13 January 2013 (UTC)[reply]
- Trial complete. Please see the trial edits here. All seemed to have gone through as expected. ·Add§hore· Talk To Me! 22:09, 13 January 2013 (UTC)[reply]
- Please also see an edit as an example for changing the tag to subsections if it appears below a section heading. ·Add§hore· Talk To Me! 22:54, 13 January 2013 (UTC)[reply]
- Looks good to me.—cyberpower ChatOnline 23:06, 13 January 2013 (UTC)[reply]
Approved. Edits look good, cases and thresholds clarified, trusted botop. — HELLKNOWZ ▎TALK 09:26, 14 January 2013 (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.