Wikipedia:Bots/Requests for approval/ImageBacklogBot 2
- 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 Approved.
Operator: --uǝʌǝsʎʇɹnoɟʇs(st47)
Automatic or Manually Assisted: Automatic
Programming Language(s): Perl
Function Summary: Removes links to non-free images
Edit period(s) (e.g. Continuous, daily, one time run): weekly
Edit rate requested: 10-15 per minute
Already has a bot flag (Y/N): N
Function Details: uses a list generated here to check for and remove any links to non-free images from pages outside of mainspace. If a page is orphaned, it will tag it.
Discussion
editDoes it use Perlwikipedia? Will it handle images with wikilinks in caption properly? What about galleries? Will it simjply remove images, or replace them with a placeholder image? MaxSem(Han shot first!) 05:35, 27 November 2007 (UTC)[reply]
- Galleries are handled, wikilinks are 99.9% handled, the only issue being nested wikilinks within the image, but that's not a very common thing, and if that happens the bot won't change anything. At the moment it's configured to remove the image - same regex as the first task - however if a placeholder would be more appropriate, we can do that. --uǝʌǝsʎʇɹnoɟʇs(st47) 11:28, 27 November 2007 (UTC)[reply]
- Yes, uses perlwikipedia with my wrapper. --uǝʌǝsʎʇɹnoɟʇs(st47) 11:45, 27 November 2007 (UTC)[reply]
- One random example: will it properly remove that image (by the way, will your bot remove images or comment them out?) MaxSem(Han shot first!) 19:38, 27 November 2007 (UTC)[reply]
- Yes, and it can do any of those. --uǝʌǝsʎʇɹnoɟʇs(st47) 23:25, 27 November 2007 (UTC)[reply]
- As for will, I think the placeholder is most useful, however that doesn't (currently) work with galleries, so I'd have to fall back to removing or commenting. --uǝʌǝsʎʇɹnoɟʇs(st47) 23:26, 27 November 2007 (UTC)[reply]
- Maybe skip galleries? — E talkBAG 20:03, 28 November 2007 (UTC)[reply]
- Why? --uǝʌǝsʎʇɹnoɟʇs(st47) 21:24, 28 November 2007 (UTC)[reply]
- Maybe skip galleries? — E talkBAG 20:03, 28 November 2007 (UTC)[reply]
- As for will, I think the placeholder is most useful, however that doesn't (currently) work with galleries, so I'd have to fall back to removing or commenting. --uǝʌǝsʎʇɹnoɟʇs(st47) 23:26, 27 November 2007 (UTC)[reply]
- Yes, and it can do any of those. --uǝʌǝsʎʇɹnoɟʇs(st47) 23:25, 27 November 2007 (UTC)[reply]
- One random example: will it properly remove that image (by the way, will your bot remove images or comment them out?) MaxSem(Han shot first!) 19:38, 27 November 2007 (UTC)[reply]
How robust are the pattern matches? If blah.jpg is a fair use image in a non-article page, will this remove any instances of blahblah.jpg and blah.jpg.jpg on the same page? Gimmetrow 04:15, 29 November 2007 (UTC)[reply]
- No. It must immediately follow "Image:". There is no terminator defined, as there shouldn't be any images with /\.jpg.+/, and it is highly unlikely that it would be used on the same page as the image we're looking for, but I can set it to make sure what it's removing is right before a ] or a |. --uǝʌǝsʎʇɹnoɟʇs(st47) 20:04, 29 November 2007 (UTC)[reply]
- OK. What about {{foo|bar=blah.jpg}}, where {{foo}} contains [[Image:{{{bar|}}}]]? Gimmetrow 20:28, 29 November 2007 (UTC)[reply]
- Bot ignores it. Too many false positives if I allow the bot to touch things without checking the Image: part. --uǝʌǝsʎʇɹnoɟʇs(st47) 20:30, 29 November 2007 (UTC)[reply]
- Here are the regexes:
$linktext=~s/(?<=(?:\[\[))$page(?=[\|\]])/Image:Example.jpg/g;
while ($linktext=~s/(\<gallery\>[\n.]+)(?<![\[\]\|])($page(\|[^\|\n]+)?)\n/\1/gis) {};
- --uǝʌǝsʎʇɹnoɟʇs(st47) 20:33, 29 November 2007 (UTC)[reply]
- Will this create a list of what it removed in a subpage? Soxred93 has a boring sig 21:52, 30 November 2007 (UTC)[reply]
- Special:Contributions/ImageBacklogBot. Anything more is a waste. --uǝʌǝsʎʇɹnoɟʇs(st47) 02:24, 1 December 2007 (UTC)[reply]
- What assistance is needed? If none other than approval, then Approved for trial (2 days). Please provide a link to the relevant contributions and/or diffs when the trial is complete. If not, what? <DREAMAFTER> <TALK> 00:44, 2 December 2007 (UTC)[reply]
- I'll make 50 edits - it may not have been clear, but this bot works on a backlog, not live. --uǝʌǝsʎʇɹnoɟʇs(st47) 00:48, 2 December 2007 (UTC)[reply]
- Went a little overboard - we had a small crisis and I wasn't watching as closely as I should have. One issue at the beginning, I forgot to fix my regexes and ended up killing a whole page, that's fixed now. --uǝʌǝsʎʇɹnoɟʇs(st47) 01:32, 2 December 2007 (UTC)[reply]
- Also, there was one image that shouldn't have been removed, one of those wikipedia logo deriviatives. I've added a command to the bot to not orphan any image with more than 10 uses, and I'm adding a negative lookahead to the regex that generates this list to skip only this tag. --uǝʌǝsʎʇɹnoɟʇs(st47) 01:40, 2 December 2007 (UTC)[reply]
- Was the bot also supposed to remove Wikimedia-copyrighted images from non-article pages (which you reverted) or was that also a malfunction? I didn't think the WMF withheld permission for this... BigBlueFish 01:43, 2 December 2007 (UTC)[reply]
- As stated, it was an error, and I've placed two sets of prevention for that: First, commonly used images will be left alone. Second, images with that tag won't even be reported. --uǝʌǝsʎʇɹnoɟʇs(st47) 01:45, 2 December 2007 (UTC)[reply]
- Was the bot also supposed to remove Wikimedia-copyrighted images from non-article pages (which you reverted) or was that also a malfunction? I didn't think the WMF withheld permission for this... BigBlueFish 01:43, 2 December 2007 (UTC)[reply]
- I'll make 50 edits - it may not have been clear, but this bot works on a backlog, not live. --uǝʌǝsʎʇɹnoɟʇs(st47) 00:48, 2 December 2007 (UTC)[reply]
- Will this create a list of what it removed in a subpage? Soxred93 has a boring sig 21:52, 30 November 2007 (UTC)[reply]
- OK. What about {{foo|bar=blah.jpg}}, where {{foo}} contains [[Image:{{{bar|}}}]]? Gimmetrow 20:28, 29 November 2007 (UTC)[reply]
(unindent) Approved for trial (2 days). Please provide a link to the relevant contributions and/or diffs when the trial is complete. If that is what is required, if not, what? You can remove what is below, if it is. <DREAMAFTER> <TALK> 03:13, 6 December 2007 (UTC)[reply]
P.S.: I do realise that it wors on a backlog, so you have two days to complete a trial. <DREAMAFTER> <TALK> 03:16, 6 December 2007 (UTC)[reply]
- How long should the trial be? --uǝʌǝsʎʇɹnoɟʇs(st47) 03:16, 6 December 2007 (UTC)[reply]
- 75 edits, two days. <DREAMAFTER> <TALK> 03:17, 6 December 2007 (UTC)[reply]
- Yeah, done. --uǝʌǝsʎʇɹnoɟʇs(st47) 00:45, 8 December 2007 (UTC)[reply]
- This page, doesn't show any recent edits, what's up? <DREAMAFTER> <TALK> 02:14, 8 December 2007 (UTC)[reply]
- I see 75 edits from the 6th of december...--uǝʌǝsʎʇɹnoɟʇs(st47) 02:21, 8 December 2007 (UTC)[reply]
- Weird, becuase I don't... Well, I will Approved for trial (2 days). Please provide a link to the relevant contributions and/or diffs when the trial is complete. Approved for trial (100 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. <DREAMAFTER> <TALK> 02:51, 8 December 2007 (UTC)[reply]
- I see it now. So... Approved. <DREAMAFTER> <TALK> 14:50, 8 December 2007 (UTC)[reply]
- 75 edits, two days. <DREAMAFTER> <TALK> 03:17, 6 December 2007 (UTC)[reply]