Jump to content

Wikipedia:Bots/Requests for approval/SdkbBot 4

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Sdkb (talk | contribs) at 15:41, 2 August 2023 (update query). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

New to bots on Wikipedia? Read these primers!

Operator: Sdkb (talk · contribs · SUL · edit count · logs · page moves · block log · rights log · ANI search)

Time filed: 05:08, Wednesday, August 2, 2023 (UTC)

Function overview: Replaces {{Collapsible option}} with {{Navbox documentation}} (a wrapper of {{Collapsible option}} that also includes TemplateData and other basic documentation elements) for navigation boxes that have no documentation except beyond {{Collapsible option}}.

Automatic, Supervised, or Manual: Automatic

Programming language(s): AutoWikiBrowser

Source code available: The bot will be operated by running through the list of template-space pages from the RegEx search query hastemplate:"collapsible option" -hastemplate:"documentation" insource:/\<noinclude\>.\{\{collapsible option}}.\[\[Category:.*navigational boxes\]\].*\<\/noinclude\>/ with a find and replace for {{collapsible option}}{{navbox documentation}}. It will use the edit summary Switch to more comprehensive documentation.

Links to relevant discussions (where appropriate): I don't know of anyone who prefers less complete documentation, so I anticipate this will be an uncontroversial task. I'll drop notices of this BRFA at WT:Template documentation, WT:Navigation template, Help talk:Collapsing, Template talk:Navbox documentation, and Template talk:Collapsible option to ensure visibility.

Edit period(s): One-time run

Estimated number of pages affected: 39,000

Namespace(s): Template

Exclusion compliant (Yes/No): Yes

Function details: Many navboxes have only {{Collapsible option}} (which I recently redesigned) as a kind of quasi-documentation. {{Navbox documentation}}, created by MJL in 2019, is a wrapper of {{Collapsible option}} that also includes other helpful elements, such as the standard green documentation background, information on correct placement, and TemplateData (which I added the other day, making it easier to add/configure navboxes with VisualEditor). These elements make it a direct improvement over {{Collapsible option}} alone. However, it has very limited usage: less than 250 transclusions, compared to 134,000 for {{Collapsible option}}. This task aims to convert a portion of those transclusions to the wrapper, specifically those that are easily identified as having no other documentation present. I may modify the search query over time to help find additional instances beyond the 25,00039,000 identified so far.

Discussion

Kudos to Certes for helping me figure out the search query. I conducted a test with my non-bot account of a little over a hundred instances earlier and ran into no issues. {{u|Sdkb}}talk 05:08, 2 August 2023 (UTC)[reply]

So this is potentially a dumb question, but if all you are doing is making a wrapper for collapsible option that does little more than put a green box around it and (for some reason) add TemplateData, why not just do that to {{collapsible option}} itself and save the hassle of having to replace 25k templates? (please do not ping on reply) Primefac (talk) 08:02, 2 August 2023 (UTC)[reply]
Not a stupid question! Since {{Collapsible option}} is just a chunk of text, it's designed to go within a larger documentation, and is used that way in some other instances (as many as 15,000). Converting it directly would break those. {{u|Sdkb}}talk 13:31, 2 August 2023 (UTC)[reply]

Updated the query, which brings the number of affected pages up to 39,000. {{u|Sdkb}}talk 15:41, 2 August 2023 (UTC)[reply]