Commons:Bots/Requests/YiFeiBot (22)

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

YiFeiBot (talk · contribs) (22)

Operator: Zhuyifei1999 (talk · contributions · Statistics · Recent activity · block log · User rights log · uploads · Global account information)

Bot's tasks for which permission is being sought: Same as w:Wikipedia:Bots/Requests_for_approval/Addbot_32: Removing interwiki links from pages where the interwiki links are already on wikidata

Automatic or manually assisted: Automatic unsupervised

Edit type (e.g. Continuous, daily, one time run): Weekly

Maximum edit rate (e.g. edits per minute): 6 edits/min

Bot flag requested: (Y/N): N

Programming language(s): python: pywikibot (source)

Zhuyifei1999 (talk) 11:48, 19 October 2014 (UTC)[reply]

Discussion

Test ran at [1], Template:Cc-by-1.0 matches but is locked --Zhuyifei1999 (talk) 11:59, 19 October 2014 (UTC)[reply]
How cross-namespaces links cases are handled? How will File: namespace be processed? --EugeneZelenko (talk) 14:32, 19 October 2014 (UTC)[reply]
Cross-namespaces interlanguage links cases are handled exactly like the other ones: Remove only if the local interlanguage link and the link on wikidata points to the same page. Files can't have its wikidata item and therefore the pages will be skipped after the checks --Zhuyifei1999 (talk) 15:47, 19 October 2014 (UTC)[reply]
I think will be good idea to skip pages with cross-namespace links and log them for further fixes. Files may have local links pointed to pages where file was used (old time practice). --EugeneZelenko (talk) 14:11, 20 October 2014 (UTC)[reply]
That's okay to add such checks. But I don't understand what you mean by "where file was used". If you mean interwiki links to pages which use this file, that's clearly "out of scope" of this task and I don't think it's a good idea to remove; if you mean interlanguage links to other wikis, it could be a good idea if it's logged (isn't it just another kind of cross-namespace links?). --Zhuyifei1999 (talk) 14:44, 20 October 2014 (UTC)[reply]
There are 52106 file pages found with interlanguage links. Shall I just generate a report about file pages and ignore the file pages in the main code? (so that the code can stay general) --Zhuyifei1999 (talk) 16:11, 20 October 2014 (UTC)[reply]
Report is now at Special:Permalink/137506538 (huge page) for # of interlanguage links > 1 --Zhuyifei1999 (talk) 11:21, 21 October 2014 (UTC)[reply]
I think will be good to remove such links, at least in cases where links are same as reported by global usage. --EugeneZelenko (talk) 14:01, 21 October 2014 (UTC)[reply]
I'll create a separate script and task for this, as it have nothing related to Wikidata (so edit summaries are also different :) ) --Zhuyifei1999 (talk) 14:14, 21 October 2014 (UTC)[reply]
That task needs to wait for bugzilla:58973 in order to fetch global usage from commons --Zhuyifei1999 (talk) 10:51, 22 October 2014 (UTC)[reply]
That is a greatly needed job. Within the namespace interwiki links should be removed after verification that they exist on wikidata. Those should be mostly in Gallery, category and template namespaces. By the way Wikipedia: and Commons: namespaces should be treated as the same, I am not sure if they are at the moment. Other related task which could be also done if possible:
  • I would remove inerwiki links (lately someone was calling then the sidebar links) from File, Creator & Institution namespaces
  • Commons category to wikipedia article interwiki links should be left alone, but it would be great if you could set d:Property:P373 on the wikidata article page. Also it would be great if you could update the links on commons. I was running the pywikipediabot's interwiki.py for some years but not since wikidata started, so many of those links are out of date. --Jarekt (talk) 02:06, 27 October 2014 (UTC)[reply]
--Jarekt (talk) 02:06, 27 October 2014 (UTC)[reply]
  • You're right, Commons namespace is treated the same, if the link on commons is already localized.
  • I'll add another task for removing iw links already on globalusage (or inderectly on wikidata) on file pages, as the code would be quite different.
  • I'm not yet going to make the bot edit wikidata due to the potential damage it might cause (what is someone inserted a wrong link?) and the code complexity of doing so.
--Zhuyifei1999 (talk) 10:10, 28 October 2014 (UTC)[reply]

@Zhuyifei1999: can you do one more testrun after your code changes? Then I think we are ready to approve this. --Dschwen (talk) 16:42, 20 November 2014 (UTC)[reply]

✓ Done 20 edits with another task running in between. --Zhuyifei1999 (talk) 08:57, 21 November 2014 (UTC)[reply]

✓ Approved Looks good to me. --Dschwen (talk) 14:52, 21 November 2014 (UTC)[reply]