w:en:Wikipedia:Bots/Requests for approval/Cewbot 6
[[User:Cewbot|Cewbot 6]]
{{BRFA help}}
{{Newbot|Cewbot|6}}
Operator: {{botop|Kanashimi}}
Time filed: 10:38, Saturday, October 10, 2020 (UTC)
Function overview: Fix broken anchors
Automatic, Supervised, or Manual: Automatic
Programming language(s): [https://github.com/kanasimi/wikiapi wikiapi]
Source code available: [https://github.com/kanasimi/wikibot/blob/master/routine/20201008.fix_anchor.js 20201008.fix_anchor.js]
Links to relevant discussions (where appropriate): Wikipedia:Bot_requests#Fixing_broken_shortcuts_to_sections
Edit period(s): Continuous
Estimated number of pages affected: estimate 10/day
Namespace(s): Articles, and may expand
Exclusion compliant (Yes/No): Yes
Function details:
File:2020100820201008.fix anchor 02.png
- Listen to edits modifying section title in ARTICLE.
- Checking all pages linking to the ARTICLE.
- If there are links with old anchor, modify it to the newer one.
- If need, the bot will search revisions to find previous renamed section title.
- The bot may notice in the talk page for lost anchors.
=Discussion=
Looks like nice functionality. Code is quite interesting, although haven't looked closely enough for issues. I know sample edit 1 was one where the anchor already existed, but in many cases it wouldn't. It may be best to limit this to articles (incl redirects in mainspace), since talk/project-space has its own myriad of issues in this sense (with archiving and all), so it may at worst conflict and at best not solve many issues (since most will be busted archive links etc). Don't think there's any issues preventing a trial for articles, though. ProcrastinatingReader (talk) 09:29, 12 October 2020 (UTC)
Thanks for the ping on BOTREQ. I think this is really cool, but I'm not sure looking at the code how "Listen to edits modifying section title in ARTICLE." is supposed to work. If I delete a section header and add a different section header in the same edit, would the bot mistakenly detect that as renaming the section? Also, what if a section is renamed and the content in it is substantially altered (which probably means incoming links shouldn't be automatically fixed)? I guess some trials could give an idea of the extent of these problems. – SD0001 (talk) 10:12, 12 October 2020 (UTC)
: Thank you for the comments. The bot will check the section titles added and deleted. Only the edits modifying just one section, and the change is not too big to be regarded as the same meaning, will be treated as the same meaning. For the case of the content substantially altered, if the section titles are not modified, it will not be counted. If the section titles are modified, the different will too big to be regarded as the same meaning, and the cases will be recorded as section titles lost. --Kanashimi (talk) 20:55, 12 October 2020 (UTC)
- {{BotTrial|edits=50}} --TheSandDoctor Talk 18:35, 27 October 2020 (UTC)
:: {{BotTrialComplete}} Please see [https://en.wikipedia.org/w/index.php?target=Cewbot&namespace=all&tagfilter=bot+trial&start=&end=&limit=50&title=Special%3AContributions the results]. Most of them seem good. --Kanashimi (talk) 08:35, 28 October 2020 (UTC)
:::Edits LGTM. {{ping|TheSandDoctor}} thoughts? ProcrastinatingReader (talk) 21:09, 6 November 2020 (UTC)
----
{{BotApproved}} for article namespace. Expansion will require amendment. Under normal circumstances, I would prefer to leave the close for someone else. However, given the backlog, lack of recent BAG activity (myself included), and the fact that this task is uncontroversial and based on how well the trial went, I am inclined to make an exception for this. As per usual, if amendments to - or clarifications regarding - this approval are needed, please start a discussion on the talk page and ping. --TheSandDoctor Talk 08:34, 7 November 2020 (UTC)
: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 Wikipedia:Bots/Noticeboard.