Wikidata:Requests for permissions/Bot/William Avery Bot
The following discussion is closed. Please do not modify it. Subsequent comments should be made in a new section. A summary of the conclusions reached follows.
- Approved --Lymantria (talk) 06:44, 31 May 2018 (UTC)[reply]
William Avery Bot (talk • contribs • new items • new lexemes • SUL • Block log • User rights log • User rights • xtools)
Operator: William Avery (talk • contribs • logs)
Task/s: Set site links for articles in w:Category:Taxonbars_desynced_from_Wikidata, where the 'desynchronised' state is due to the lack of such a link.
Code: I have made additions to the codebase used for the bot's task on enwiki.
The entry point script is
The script has some method parameters hard coded, such as "dryrun", the odd count/limit for test purposes.
Function details: The bot is concerned with articles about biological taxa, that use the w:Template:Taxonbar template. The commonest reason why articles appear in this maintenance category is that there are users/bots on Wikipedia that specify a wikidata id in the template parameters, but don't make a sitelink on wikidata for that wikidata id.
I have been carrying out this task on a page-by-page basis, assisted by a userscript, but the volume has become too great.
- Use PetScan to get a list of pages in the target category, w:Category:Taxonbars_desynced_from_Wikidata.
- Discard ones that already have a sitelink on Wikidata. Those that do are beyond the scope of this bot.
- Use the article HTML to interrogate the Wikidata id specified in the taxonbar.
- Discard those pages where the Wikidata id is invalid or the wikidata item already has an enwiki site link.
- Create a site link for the enwiki page / wikidata id
I don't try and check the name of the Wikidata item against the taxon in the article's taxon box. In practice, the only time I've found it to be wrong is when somebody has cut and pasted markup from an old article, in which case the Wikidata item already has a sitelink, and is discarded by the above algorithm.
--William Avery (talk) 21:48, 3 May 2018 (UTC)[reply]
- Please make some test edits.--Ymblanter (talk) 19:14, 7 May 2018 (UTC)[reply]
- You made 8 test edits. Can you do some more, say 50? Lymantria (talk) 08:44, 26 May 2018 (UTC)[reply]
- I have run more tests, taking the total edit count up to 51. The results seem satisfactory. William Avery (talk) 20:18, 27 May 2018 (UTC)[reply]
- I am ready to approve this bot in a couple of days, provided that no objections will be raised. Lymantria (talk) 05:22, 29 May 2018 (UTC)[reply]
- I have run more tests, taking the total edit count up to 51. The results seem satisfactory. William Avery (talk) 20:18, 27 May 2018 (UTC)[reply]