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
Request Expired.
Operator: TheSandDoctor (talk · contribs · SUL · edit count · logs · page moves · block log · rights log · ANI search)
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 <nowiki>File:Title.extension</nowwiki> (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 Category:Pages using deprecated image syntax 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
edit- Given that the {{click}} template itself is deprecated, could/should it be removed altogether where found? Richard0612 07:57, 16 May 2018 (UTC)[reply]
- Good point Richard0612, task updated. --TheSandDoctor Talk 13:51, 16 May 2018 (UTC)[reply]
- 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. Ronhjones (Talk) 17:49, 16 May 2018 (UTC)[reply]
- I have seen the same thing Ronhjones. In short: your assumption is correct. In detail: The bot no longer would go through that category,[a] 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. --TheSandDoctor Talk 01:08, 17 May 2018 (UTC)[reply]
- ^ I should note that, while a good chunk of the transclusions are not within the category you linked, I might still run the bot through there first doing the conversions for the save of simplicity. Ultimately though, it would be running through the transclusions
- @TheSandDoctor: 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)[reply]
- @Xaosflux: 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. --TheSandDoctor Talk 03:49, 25 May 2018 (UTC)[reply]
- @TheSandDoctor: 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)[reply]
Request Expired. No operator update in 2 months. Feel free to represent in the future. — xaosflux Talk 01:45, 1 August 2018 (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 WT:BRFA.