Wikipedia:Bots/Requests for approval/StradBot 2

StradBot 2

[[User:StradBot|StradBot 2]]

{{BRFA help}}

{{Newbot|StradBot|2}}

Operator: {{botop|Mr. Stradivarius}}

Time filed: 03:19, Saturday, February 17, 2024 (UTC)

Function overview: Automatically populate sandboxes for modules listing disambiguation templates, set index templates or soft redirect templates; and if necessary issue edit requests to update the main modules.

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): Template talk:Pagetype#Detecting pages with Template:Wiktionary redirect and other soft redirects (permalink)

Edit period(s): Daily

Estimated number of pages affected: 5

Namespace(s): Module, module talk, template talk

Exclusion compliant (Yes/No): Yes

Function details: This is an expansion of Wikipedia:Bots/Requests for approval/StradBot (task 1). Task 1 was for updating a disambiguation template list for Module:Disambiguation; this task expands this to two more use cases: updating a list of set index pages for Module:Pagetype, and updating a list of soft redirects, also for Module:Pagetype.

The bot uses the following algorithm. This has not changed since task 1.

  1. The bot constructs a list of disambiguation templates, set index templates or soft redirect templates. The list includes template redirects. It does this by iterating through all templates in a specific category (the -cat option). Non-templates are ignored, as are templates in the bot's exclusion list (the -exclude option). It then retrieves redirects for all of these templates.
  2. It formats the list of templates and template redirects as a Lua table, and saves the result in a module sandbox (the -data-page-sandbox option). Saving is skipped if the module's content would not change. You can see sample output from the bot here.
  3. If the sandbox module was updated, and if its new content is different from that of the main module (the -data-page option), then the bot adds an edit request to update the main module to the relevant talk page (the -data-talk-page option). There is a sample edit request here.

The bot will be used to update the following modules:

class="wikitable"

! #

! Use case

! Option

! Value

! Notes

rowspan="5" | 1

| rowspan="5" | Update disambiguation templates for Module:Disambiguation.

| -data-page-sandbox

| Module:Disambiguation/templates/sandbox

| rowspan="5" | Already approved in Wikipedia:Bots/Requests for approval/StradBot.

-data-page

| Module:Disambiguation/templates

-data-talk-page

| Module talk:Disambiguation

-cat

| :Category:Disambiguation message boxes

-exclude

| Template:Dmbox

rowspan="5" | 2

| rowspan="5" | Update set index templates for Module:Pagetype.

| -data-page-sandbox

| Module:Pagetype/setindex/sandbox

| rowspan="5" |

-data-page

| Module:Pagetype/setindex

-data-talk-page

| Template talk:Pagetype

-cat

| :Category:Set index article templates

-exclude

| Template:Dmbox

rowspan="5" | 3

| rowspan="5" | Update soft redirect templates for Module:Pagetype.

| -data-page-sandbox

| Module:Pagetype/softredirect/sandbox

| rowspan="5" |

-data-page

| Module:Pagetype/softredirect

-data-talk-page

| Template talk:Pagetype

-cat

| :Category:Templates for soft redirects

-exclude

| Template:Resolve category redirect

=Discussion=

:{{Bottrial|one-time run}} – SD0001 (talk) 05:58, 17 February 2024 (UTC)

:{{Operator assistance needed|D}} {{re|Mr. Stradivarius}} is there still interest in pursuing this task? or are you happy to mark this as withdrawn? ProcrastinatingReader (talk) 10:57, 29 September 2024 (UTC)

::{{re|ProcrastinatingReader}} The task is still open and valid, but I'm not likely to get around to it in the near future. I will withdraw this BRFA for now, and reinstate it if time allows. (Would I need to do so in a new request?) — Mr. Stradivarius ♪ talk ♪ 11:25, 30 September 2024 (UTC)

:::{{BotWithdrawn}} Sure. Either a new request or reopening this one would be okay, whichever you prefer. ProcrastinatingReader (talk) 22:52, 11 October 2024 (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.