New to bots on Wikipedia? Read these primers!
Operator: Mr. Stradivarius ( talk · contribs · SUL · edit count · logs · page moves · block log · rights log · ANI search)
Time filed: 13:39, Wednesday, September 27, 2023 ( UTC)
Function overview: Automatically populate
Module:Disambiguation/templates
Module:Disambiguation/templates/sandbox with a list of disambiguation templates and their redirects, and if necessary issue an edit request to update
Module:Disambiguation/templates.
Automatic, Supervised, or Manual: Automatic
Programming language(s): Python (Pywikibot framework)
Source code available: https://github.com/mrstradivarius/dabtemplates
Links to relevant discussions (where appropriate): Module talk:Disambiguation#Bot for updating template list
Edit period(s): Daily
Estimated number of pages affected: 1 2
Namespace(s): The Module namespace
Exclusion compliant (Yes/No): Yes
Adminbot (Yes/No): Yes No
Function details: The bot iterates through all templates in
Category:Disambiguation message boxes. Non-templates are ignored, as are templates in the bot's exclusion list (currently
Template:Dmbox is ignored). The bot creates a list of all of these templates, and all of their redirects, formats it as a Lua table, and saves the result at
Module:Disambiguation/templates
Module:Disambiguation/templates/sandbox. The top comment of the module is parsed from the existing module at
Module:Disambiguation/templates. Saving is skipped if the module's content would not change. I have saved sample output from the bot
here.
Module:Disambiguation/templates is fully protected as it is used in
Module:Disambiguation, which is currently transcluded on roughly 15.7 million pages, so the bot needs permission to edit protected pages. If
Module:Disambiguation/templates/sandbox was updated, and if its new content is different from that of
Module:Disambiguation/templates, then an edit request to update
Module:Disambiguation/templates is added to
Module talk:Disambiguation. There is a sample edit request
here.
This seems like serious overkill. New templates only will be added very occasionally. Wouldn't it be better to have a bot edit from time to time a separate list of all these templates, and if and when there are changes, let an admin update the module page manually (while checking that no one has added or removed a template by mistake or maliciously at the same time, something a bot won't do)? Granting admin status for a bot that will only really need to make a change once every month or so is not a good idea IMO (benefit-risk balancewise). Fram ( talk) 08:44, 28 September 2023 (UTC) reply
Trial complete. Due to discussion above, I changed the bot to edit Module:Disambiguation/templates/sandbox and issue an edit request at Module talk:Disambiguation, instead of editing Module:Disambiguation/templates directly. Also, due to discussion this discussion I changed the format of the Lua module to be closer to the existing format. I have updated the description above to reflect these changes. The bot has made the following edits since those changes:
See here for all contributions related to this task. — Mr. Stradivarius ♪ talk ♪ 06:17, 22 October 2023 (UTC) reply
Approved. No issues. – SD0001 ( talk) 18:24, 22 October 2023 (UTC) reply
New to bots on Wikipedia? Read these primers!
Operator: Mr. Stradivarius ( talk · contribs · SUL · edit count · logs · page moves · block log · rights log · ANI search)
Time filed: 13:39, Wednesday, September 27, 2023 ( UTC)
Function overview: Automatically populate
Module:Disambiguation/templates
Module:Disambiguation/templates/sandbox with a list of disambiguation templates and their redirects, and if necessary issue an edit request to update
Module:Disambiguation/templates.
Automatic, Supervised, or Manual: Automatic
Programming language(s): Python (Pywikibot framework)
Source code available: https://github.com/mrstradivarius/dabtemplates
Links to relevant discussions (where appropriate): Module talk:Disambiguation#Bot for updating template list
Edit period(s): Daily
Estimated number of pages affected: 1 2
Namespace(s): The Module namespace
Exclusion compliant (Yes/No): Yes
Adminbot (Yes/No): Yes No
Function details: The bot iterates through all templates in
Category:Disambiguation message boxes. Non-templates are ignored, as are templates in the bot's exclusion list (currently
Template:Dmbox is ignored). The bot creates a list of all of these templates, and all of their redirects, formats it as a Lua table, and saves the result at
Module:Disambiguation/templates
Module:Disambiguation/templates/sandbox. The top comment of the module is parsed from the existing module at
Module:Disambiguation/templates. Saving is skipped if the module's content would not change. I have saved sample output from the bot
here.
Module:Disambiguation/templates is fully protected as it is used in
Module:Disambiguation, which is currently transcluded on roughly 15.7 million pages, so the bot needs permission to edit protected pages. If
Module:Disambiguation/templates/sandbox was updated, and if its new content is different from that of
Module:Disambiguation/templates, then an edit request to update
Module:Disambiguation/templates is added to
Module talk:Disambiguation. There is a sample edit request
here.
This seems like serious overkill. New templates only will be added very occasionally. Wouldn't it be better to have a bot edit from time to time a separate list of all these templates, and if and when there are changes, let an admin update the module page manually (while checking that no one has added or removed a template by mistake or maliciously at the same time, something a bot won't do)? Granting admin status for a bot that will only really need to make a change once every month or so is not a good idea IMO (benefit-risk balancewise). Fram ( talk) 08:44, 28 September 2023 (UTC) reply
Trial complete. Due to discussion above, I changed the bot to edit Module:Disambiguation/templates/sandbox and issue an edit request at Module talk:Disambiguation, instead of editing Module:Disambiguation/templates directly. Also, due to discussion this discussion I changed the format of the Lua module to be closer to the existing format. I have updated the description above to reflect these changes. The bot has made the following edits since those changes:
See here for all contributions related to this task. — Mr. Stradivarius ♪ talk ♪ 06:17, 22 October 2023 (UTC) reply
Approved. No issues. – SD0001 ( talk) 18:24, 22 October 2023 (UTC) reply