Wikipedia:Bots/Requests for approval/EarwigBot 17
- 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 Approved.
Operator: The Earwig (talk · contribs)
Automatic or Manually assisted: Automatic, unsupervised
Programming language(s): Python
Source code available: from tools:~earwig/earwigbot: infoboxshipimagebot_run.py
Function overview: The bot will remove File:No Photo Available.svg from all transclusions of {{Infobox ship image}}.
Links to relevant discussions (where appropriate): Wikipedia:Bot requests/Archive 35#Remove 'No Photo Available.svg' from Ship infoboxes
Edit period(s): One time run.
Estimated number of pages affected: ~3,500
Exclusion compliant (Y/N): Y
Already has a bot flag (Y/N): Y
Function details: See function overview. The bot will loop through all imagelinks to File:No Photo Available.svg (list obtained using a MySQL query), and will blank the |Ship image=
parameter of {{Infobox ship image}} if that template happens to be on the page, and also happens to contain the image. — The Earwig (talk) 22:05, 23 April 2010 (UTC)[reply]
Discussion
[edit]There sees to be a small amount of objection to this, although at TT:Infobox ship begin there seems to be support. Anyhow, surely with some clever template coding, we can come up with a template that can check if the image parameter is [1]]? And if so add it to the category. - Kingpin13 (talk) 06:45, 27 April 2010 (UTC)[reply]
- Two things about that; for one, I'm pretty sure that the point of the BOTREQ (at least from my understanding of it) is to remove the image itself, not simply to ensure that all pages without images are categorized, so categorizing them would not fix the problem completely; and two, from my understanding of templates, any proposed fix would be very hackish and ugly, because it would need to account for
[[File:No Photo Available.svg]]
,[[Image:No Photo Available.svg]]
,[[Image:No Photo Available.svg|300px|AlternateTextHere]]
,[[File:No Photo Available.svg|300px|AlternateTextHere]]
, as well as any number of variations involving both the comment and the size – I have seen multiple versions in use as I was writing the bot, and there is no conceivable way for the template to account for all of them. — The Earwig (talk) 20:41, 27 April 2010 (UTC)[reply]- Curiously I just analysed the number of uses of various infoboxes in the last dump, Infobox ship image comes in around the 19000 mark. I would suggest you use a too to create lists of "what transculdes here" for the image template, and what links here for the image, and take the intersection. AWB can do this. It will speed the bot run considerably. Rich Farmbrough, 05:20, 28 April 2010 (UTC).[reply]
- I don't know about that. The significant majority of the imagelinks to pages in the mainspace for File:No Photo Available.svg are to pages using {{Infobox ship begin}}; I'm not sure if it will save me that much time at all, but I suppose I could implement it if you really think it is necessary. — The Earwig (talk) 10:43, 28 April 2010 (UTC)[reply]
- Hi, just wanted to add some background. The purpose of removing the
[[Image:No Photo Available.svg]]
usage from articles where it is using the {{Infobox ship begin}} is because the template code has recently been updated to automatically add the page to Category:Ship infoboxes without an image which therefore makes the use of the image redundant. The BOTREQ was to remove the usage of the image so that the Category automatically picks up the requirement for an image to be added to the infobox/article rather than leaving it down to manual/human intervention to tag the article. JonEastham (talk) 12:42, 28 April 2010 (UTC)[reply]- {{BAGAssistanceNeeded}} I see. Note this recent comment; I think it is safe to proceed with a trial of sorts, and this has not had any real BAG attention for some time. Thanks. — The Earwig (talk) 10:25, 30 April 2010 (UTC)[reply]
- Hi, just wanted to add some background. The purpose of removing the
- I don't know about that. The significant majority of the imagelinks to pages in the mainspace for File:No Photo Available.svg are to pages using {{Infobox ship begin}}; I'm not sure if it will save me that much time at all, but I suppose I could implement it if you really think it is necessary. — The Earwig (talk) 10:43, 28 April 2010 (UTC)[reply]
- Curiously I just analysed the number of uses of various infoboxes in the last dump, Infobox ship image comes in around the 19000 mark. I would suggest you use a too to create lists of "what transculdes here" for the image template, and what links here for the image, and take the intersection. AWB can do this. It will speed the bot run considerably. Rich Farmbrough, 05:20, 28 April 2010 (UTC).[reply]
Approved for trial (50 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. - Kingpin13 (talk) 05:13, 1 May 2010 (UTC)[reply]
- Trial complete. [1] — The Earwig (talk) 06:56, 1 May 2010 (UTC)[reply]
- Nice work. Approved. - Kingpin13 (talk) 07:07, 1 May 2010 (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.