Wikipedia:Bots/Requests for approval/Legobot 28
- 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: Legoktm (talk · contribs · SUL · edit count · logs · page moves · block log · rights log · ANI search)
Time filed: 13:07, Friday February 15, 2013 (UTC)
Automatic, Supervised, or Manual: Automatic
Programming language(s): Python
Source code available: soon
Function overview: Convert langlinks to Wikidata
Links to relevant discussions (where appropriate):
Edit period(s): One time run
Estimated number of pages affected: Any page with langlinks not in the userspace. According to a DB query this is 2,651,569 pages.
Exclusion compliant (Yes/No): It will respect {{noexternallanglinks}} but not {{nobots}}
.
Already has a bot flag (Yes/No): Yes
Function details:
- Check if the page has a wikidata item
- If langlinks match wikidata: remove all links
- If some sites are missing, (but links match): add missing links to Wikidata, then remove all links.
- If there is a conflict of links, bot will make a log note of it (possibly on wikidata), and skip
- If the item does not exist:
- Try creating a wikidata item with local langlinks. If that succeeds, remove all links.
- If there is an error, figure out which sitelinks are already in use, and try to merge. If successful, remove all links. If not, log it as an error.
- Try creating a wikidata item with local langlinks. If that succeeds, remove all links.
Notes:
- In the context in regards to removing, any FA/GA links are ignored. They will still be imported though.
- This will be dependent on a bot request on Wikidata as well: d:Wikidata:Requests for permissions/Legobot 5.
Discussion
[edit]- I'm not sure if there is a reason to respect
{{nobots}}
, since usually it's used for other things. Legoktm (talk) 13:07, 15 February 2013 (UTC)[reply] - I don't see any issues here.—cyberpower ChatLimited Access 14:01, 15 February 2013 (UTC)[reply]
- After a discussion (which I will try and find the link for) it was decided not to remove interwikis in an edit by itself, unless a lot of them were going to be removed (such as 50). Would the bot edit to simply remove 1 link? ·Add§hore· Talk To Me! 14:39, 15 February 2013 (UTC)[reply]
- That really doesn't make sense to me. Since the local link will override the wikidata one, if the wikidata link is ever changed, enwiki won't display it until someone fixes the link or removes it. Legoktm (talk) 14:45, 15 February 2013 (UTC)[reply]
- I did not realise that although it does make sense! What would the edit rate be? ·Add§hore· Talk To Me! 14:53, 15 February 2013 (UTC)[reply]
- No faster than 6epm on enwiki. Legoktm (talk) 14:55, 15 February 2013 (UTC)[reply]
- A 482 day task, ish! Approved for trial (50 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. ·Add§hore· Talk To Me! 15:04, 15 February 2013 (UTC)[reply]
- No faster than 6epm on enwiki. Legoktm (talk) 14:55, 15 February 2013 (UTC)[reply]
- I did not realise that although it does make sense! What would the edit rate be? ·Add§hore· Talk To Me! 14:53, 15 February 2013 (UTC)[reply]
- That really doesn't make sense to me. Since the local link will override the wikidata one, if the wikidata link is ever changed, enwiki won't display it until someone fixes the link or removes it. Legoktm (talk) 14:45, 15 February 2013 (UTC)[reply]
- After a discussion (which I will try and find the link for) it was decided not to remove interwikis in an edit by itself, unless a lot of them were going to be removed (such as 50). Would the bot edit to simply remove 1 link? ·Add§hore· Talk To Me! 14:39, 15 February 2013 (UTC)[reply]
- (edit conflict), (Not a BAG member, but...) Addshore, are you thinking of Wikipedia_talk:Wikidata_interwiki_RFC, and in particular the discussion at #Common sense? Also, and I'd guess you already know this Legoktm, but there's a magic word, something like "noexternallanglinks" in the FAQ, that probably needs to be taken into account in addition to the links themselves. Just mentioning it in case it got lost in the shuffle. Cheers, --j⚛e deckertalk 15:05, 15 February 2013 (UTC)[reply]
- Yep Wikipedia_talk:Wikidata_interwiki_RFC was the one, Legoktm mentioned ignoring pages with {{noexternallanglinks}} above. ·Add§hore· Talk To Me! 15:07, 15 February 2013 (UTC)[reply]
- Well, then I just need to read more carefully. :-) --j⚛e deckertalk 16:54, 15 February 2013 (UTC)[reply]
- I've read that discussion, and don't agree with the idea that only 50+ links should be removed. I would actually think of it the other way. Pages with less langlinks are usually lower importance pages, and therefore less traffic pages, meaning the chances of them being edited are greatly less.
- I also don't see the problem with having a bot make a ton of edits to fix all the links just once, since in the past if a link needed to be changed, whether it was 100 or 1, a bot would still have to do it. Legoktm (talk) 15:14, 15 February 2013 (UTC)[reply]
- (non-BAG) Personally, I agree, just for the record. --j⚛e deckertalk 16:55, 15 February 2013 (UTC)[reply]
- I also don't see any problems with having a bot make the ton of edits to fix all the interwiki links. Lord Sjones23 (talk - contributions) 17:54, 15 February 2013 (UTC)[reply]
- Yes, sounds like a made-for-bot task, whether 1 or 100 links. -166.137.210.49 (talk) 18:33, 15 February 2013 (UTC)[reply]
- Yep Wikipedia_talk:Wikidata_interwiki_RFC was the one, Legoktm mentioned ignoring pages with {{noexternallanglinks}} above. ·Add§hore· Talk To Me! 15:07, 15 February 2013 (UTC)[reply]
- (edit conflict), (Not a BAG member, but...) Addshore, are you thinking of Wikipedia_talk:Wikidata_interwiki_RFC, and in particular the discussion at #Common sense? Also, and I'd guess you already know this Legoktm, but there's a magic word, something like "noexternallanglinks" in the FAQ, that probably needs to be taken into account in addition to the links themselves. Just mentioning it in case it got lost in the shuffle. Cheers, --j⚛e deckertalk 15:05, 15 February 2013 (UTC)[reply]
- If people are in favor of the bot making lots of edits, can we get it to combine as many tasks as possible (gen fixes, sorts, etc.) to get the most bang for our buck out of the minor edits? I can't think off-hand of all the tasks, but maybe some combination of SmackBot/Rjwil*/etc. minor tasks. MBisanz talk 19:13, 16 February 2013 (UTC)[reply]
- -.- mabdul 21:17, 18 February 2013 (UTC)[reply]
- Normally I'd try that, except people are already so confused at this "apparent vandalism" that I really don't want to stuff anything else in. Also my current library of genfixes would require me to parse the page using mwparserfromhell, slowing down the process even more, since I've taken that out. Legoktm (talk) 15:07, 19 February 2013 (UTC)[reply]
- While manually removing langlinks, I've noticed that conflicts are fairly common where the Wikipedia link and Wikidata link seemingly don't agree, but it turns out one of them points to a redirect page that redirects to the other. I.e., a page was moved but one of the links wasn't updated. It would be nice if the bot could resolve this automatically. —Naddy (talk) 20:58, 18 February 2013 (UTC)[reply]
- Heh, my bot on Wikidata does this already (d:Wikidata:Requests_for_permissions/Legobot) :) Legoktm (talk) 15:07, 19 February 2013 (UTC)[reply]
- Trial complete. - well close enough. There are a few differences from the specification I originally outlined. My code is not yet ready to create items on Wikidata, so those will simply be logged as an error (logs: User:Legobot/Wikidata/2013/02/19). If an item is missing one or two sitelinks, the bot will add those into Wikidata if possible, and then will remove links.
- There was a slight bug where links to minwiki were not removed, that was because I did not update all parts of my pywikibot configuration, this has been fixed. If the trial looks good, I would like to proceed with approval rather than waiting to get my code ready for item creation, since that only makes a difference on the Wikidata side. Thanks, Legoktm (talk) 15:07, 19 February 2013 (UTC)[reply]
Approved. - Any other features do not need to be discussed here bot instead on wikidata. ·Add§hore· Talk To Me! 15:11, 19 February 2013 (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.