Wikipedia:Bots/Requests for approval/DaxServerBot I 2
- The following discussion is an archived debate. Please do not modify it. To request review of this BRFA, please start a new section at Wikipedia:Bots/Noticeboard. The result of the discussion was Request Expired.
Operator: DaxServer (talk · contribs · SUL · edit count · logs · page moves · block log · rights log · ANI search)
Time filed: 19:03, Monday, August 16, 2021 (UTC)
Automatic, Supervised, or Manual: supervised
Programming language(s): Python
Source code available: Pywikibot Github
Function overview: Add {{Documentation}}
and {{Check completeness of transclusions}}
to Navbox templates
Links to relevant discussions (where appropriate):
Edit period(s): Regular
Estimated number of pages affected: 50,000+
Exclusion compliant (Yes/No): Yes
Already has a bot flag (Yes/No): No
Function details: I'll be using this bot to add {{Documentation}}
and {{Check completeness of transclusions}}
for {{Navbox}}
templates, so that the usability would be improved for the templates.
I'll be using these regexes, which would be improved when an edge case is encountered.
}}<noinclude>\n{{Documentation\|content=\n{{Align\|right\|{{Check completeness of transclusions}}}}\n{{collapsible option}}\n}}
to check if they are already present and skip^{{Navbox
to check if this is a Navbox at all and skip}}\s*<noinclude>(\[\[Category:.*)?(?:\s*(?:{{Documentation\|content=\n)?(?:<br/>)?{{collapsible option}}(?:\n}})?)?(?=(?:\n*{{.*}})?(?:\n*<!--Categories-->)?\s*(?:\[\[Category:|==\s*See also\s*==))
for pattern matching to insert the doc and transclusion check templates, after the above checks
I've been using AWB (link) for the last couple of days and would like to automate it. So far, I've only modified the templates within the scope of India but could be expanded if automated. There were a few edits (like this, the usage section was manually added so as to separate the text from state param doc) failed the regex as there is a text. It is a manual copy-paste in AWB for the moment, regex could be expanded if it's a common occurrence. The bot would take a category (preferably from terminal) and parse recursively and is not run in an indefinite mode, or during my off-hours.
Discussion
[edit]I was looking at your previous manual edits and on this edit you added {{collapsible option}} but the navbox does not have the |state={{{state|}}}
parameter. Shouldn't you also be adding that or not adding the collapsible option? -- WOSlinker (talk) 14:44, 17 August 2021 (UTC)[reply]
- @WOSlinker True, I've corrected it. Thanks for the inspection. I'll run AWB again (or using the bot after approved) if you on the templates I edited (all covered recursively under Category:India templates), and check if the state is not set. I'd propose setting it as
|state={{{state|autocollapse}}}
or should I omit the autocollapse? Or, should I skip the page totally when there is no state param set? Thoughts? -- DaxServer (talk) 16:08, 17 August 2021 (UTC)[reply] - There were a few edits like this, where the collapsible option has a state param. I retained it by editing manually, but the regex would be updated to account for it. -- DaxServer (talk) 16:27, 17 August 2021 (UTC)[reply]
- I think setting the state as
|state={{{state|<includeonly>autocollapse</includeonly>}}}
would work better so that it does not autocollapse on the template page itself where the template page may have some other navbox on the page in the documentation section, such as that example you linked to. -- WOSlinker (talk) 16:45, 17 August 2021 (UTC)[reply]- In that case, I'd expand the bot to set the state for all Navboxes it parses:
- if not set, set to what you said
- if
|state=autocollapse
or{{{state|autocollapse}}}
is set (even the ones I updated in AWB), update it to add includeonly - if
|state={{{state|}}}
is set, update it to set includeonly autocollapse - if state is set to
collapsed
orexpanded
, retain it and add the parameter to the{{collapsed option|default=xyz}}
- Also to mention, I'd log the templates that failed the regexes so an incremental regex update would be done or a manual update based on the content. -- DaxServer (talk) 17:16, 17 August 2021 (UTC)[reply]
- Actually, how about this:
|state={{{state|<includeonly>autocollapse</includeonly><noinclude>expanded</noinclude>}}}
like this edit so that the navbox will be expanded always on the template page? -- DaxServer (talk) 14:23, 21 August 2021 (UTC)[reply]
- Actually, how about this:
- In that case, I'd expand the bot to set the state for all Navboxes it parses:
- I think setting the state as
- My initial thoughts are somewhat negative here. Not every navbox needs a /doc, and not every navbox needs a {{collapsible option}}, and most of them definitely do not need a {{collapsible option}} template inside a {{documentation}}. I think you need to demonstrate consensus before this gets approved, or even before you keep mass-adding this content with AWB. Primefac (talk) 20:55, 22 August 2021 (UTC)[reply]
- On hold. Thanks for the inputs, Primefac! — DaxServer (talk to me) 19:26, 25 August 2021 (UTC)[reply]
- @DaxServer: Just to follow up here: do you still intend to go through with this BRFA? ProcrastinatingReader (talk) 01:08, 8 November 2021 (UTC)[reply]
- Request Expired. due to inactivity. Feel free to re-file (or ping to reopen) if you wish to continue this BRFA, and have addressed any standing concerns above. ProcrastinatingReader (talk) 01:42, 16 November 2021 (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 Wikipedia:Bots/Noticeboard.