Wikipedia:Bots/Requests for approval/LivingBot 5


 * The following discussion is an archived debate. Please do not modify it. Subsequent comments should be made in a new section. The result of the discussion was Symbol keep vote.svg Approved.

LivingBot 5
Operator: - Jarry1250 (t, c)

Automatic or Manually Assisted: Supervised automatic

Programming Language(s): PHP

Function Summary: See this botreq. Replaces instances of "| image = " on Infobox Television Films with two separate parameters: | image = xxx.jpg
 * image_size = 123px

Edit period(s): One time run

Already has a bot flag (Y/N): Y

Function Details: See this botreq. Replaces instances of "| image = " on Infobox Television Films with two separate parameters: | image = xxx.jpg This would be accompanied with an alteration to the template itself to accept this sort of input, either performed by emerson7 or myself. He seems to have proposed the idea on the template talk page, as a step on the path to ensuring consistency with both Infobox Film and Infobox Television.
 * image_size = 123px

I've already coded it, and here are some of the issues encountered and accounted for:
 * Both image: and file:
 * Different possible file extensions for the image: (jpg|jpeg|png|bmp|gif|svg)
 * Instances where an empty image_size would overwrite the one added: remove this
 * Instances where no size is specified: don't add/remove/replace image_size as may contain the desired size already
 * Where the template is a redirect to the desired template, and other changes are made, replace it

Source code available.

Discussion

 * You're going to encounter cases where the "image" parameter is of the form | image = . Can the bot handle it? --Carnildo (talk) 10:18, 25 January 2009 (UTC)
 * Well, it doesn't so much handle it as ignore the page completely: it hasn't found a valid image construct, so it just moves on to the next page. (I think this is the correct thing to be doing, please shout if you think not.) - Jarry1250 (t, c) 11:34, 25 January 2009 (UTC)
 * I can't really see that there are going to be many commented out images in this run (why would they be so in the first place, and if they're not supposed to be there shouldn't they just be removed?). Everything looks good to me, so we may as well test it out.  Richard  0612  16:16, 25 January 2009 (UTC)
 * These edits seem to be just fine. - Jarry1250 (t, c) 17:39, 25 January 2009 (UTC)
 * Everything looks fine to me.  Richard 0612  17:43, 25 January 2009 (UTC)


 * The above discussion is preserved as an archive of the debate. Please do not modify it. Subsequent comments should be made in a new section.