Wikipedia:Bots/Requests for approval/DeprecatedFixerBot 5


 * The following discussion is an archived debate. Please do not modify it. To request review of this BRFA, please start a new section at WT:BRFA. The result of the discussion was

DeprecatedFixerBot 5
Operator:

Time filed: 05:15, Wednesday, May 16, 2018 (UTC)

Automatic, Supervised, or Manual: automatic

Programming language(s): Python

Source code available: https://github.com/TheSandDoctor/Click-deprecated-param-fixer/tree/master

Function overview: Goes through click's transclusions, converting click to the (using click's image and link parameters (respectively) to popular the fields.

Links to relevant discussions (where appropriate): Category:Pages containing click using deprecated parameters, Template:Click

Edit period(s): Routine runs until category is cleared, possible maintenance runs in future

Estimated number of pages affected: 12,300 (approx)

Exclusion compliant (Yes/No): Yes

Already has a bot flag (Yes/No): Yes

Function details: If the click (or click-fixed) template are found on the page, the bot would fetch the values stored in the image and link parameters and store them internally. It would then replace that instance of the click/click-fixed template with the newer file format. If they were not found (ie in a transcluded template), then the bot would simply move on. I anticipate that some pages may be left behind in the category that will need to be dealt with by hand, but a bot could help reduce that number and make those cases more obvious (so they could be identified and addressed). Some pages may also be added to if the click template happens to be within an infobox. I do not anticipate that the category would be flooded with new pages, however.

Discussion

 * Given that the click template itself is deprecated, could/should it be removed altogether where found?  Richard 0612  07:57, 16 May 2018 (UTC)
 * Good point, task updated. -- The SandDoctor Talk 13:51, 16 May 2018 (UTC)
 * I note that Category:Pages containing click using deprecated parameters seems to have pulled in some pages that do not have the click template. I assume it will leave those pages alone? I know because one of may sub pages is flagged - User:Ronhjones/Gallery, it might have the word "click" inside a template, but it's not (and never has) used the click template. Ron h jones (Talk) 17:49, 16 May 2018 (UTC)
 * I have seen the same thing . In short: your assumption is correct. In detail: The bot no longer would go through that category, rather the transclusions looking for the click template and converting it. If the click template (or click-fixed) is not present, then the page in question would not be edited and the bot would simply move on to the next one. What it does is it pulls the wiki code of a page, filters out the templates in the page, and then loops through them looking for a match to (a) given template name(s) (hardcoded). If one is not found, then the content_changed flag is never true and, as such, the page is not resaved and the bot just moves on to the next one in its list.
 * Hopefully that helps to alleviate any concerns. If you have any questions, please feel free to let me know. -- The SandDoctor Talk 01:08, 17 May 2018 (UTC)


 * can you provide a couple of diffs (make them with your own account) below to demonstrate exactly the edit content that will be made? — xaosflux  Talk 14:00, 21 May 2018 (UTC)
 * I will have to modify the bot's code a bit as this has taught me a couple things (namely that size needs to be preserved if specified). With that said, the diffs are what the bot would be expected to do once altered. Diff 1, Diff 2. I will happily do more (and might add to this) in the future, but at the moment I do not have time. There appears to be a transcluded template (by the looks) that is resulting in a lot of these pages showing up that do not have click or click-fixed anywhere on them, so I will probably do some data analysis/detective work later and see if I can figure out where these are coming from (and hopefully resolve). Will keep this BRFA posted. -- The SandDoctor Talk 03:49, 25 May 2018 (UTC)


 * No operator update in 2 months. Feel free to represent in the future. —  xaosflux  Talk 01:45, 1 August 2018 (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 WT:BRFA.