Commons:Bots/Requests/Pi bot 2

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

Pi bot (talk · contribs) 2

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

Bot's tasks for which permission is being sought: Trim duplicate external ID information from categories where those IDs are shown in {{Wikidata Infobox}}

Automatic or manually assisted: Automatic

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

Maximum edit rate (e.g. edits per minute): 10 edits per minute

Bot flag requested: (Y/N): Y (Pi bot already has this)

Programming language(s): pywkibot. source code

This bot looks for categories that use both {{Wikidata infobox}} and specified external ID templates where both are displaying the same link (and/or templates like {{Mainw}} without parameters or only links to Wikipedia articles that are shown in the infobox). When it finds such a case, then it removes the external ID template (and the other templates where possible), as well as extra whitespace, before saving the page. It is currently coded to look at National Heritage List for England number (P1216) and Category:Listed buildings in England with known IDs, but this will be expanded for other IDs in the future. The motivation is that we don't need to have duplicate links, and it's better to use the ones from Wikidata via the infobox to avoid cluttering the category with multiple templates. It links in with a proposed Wikidata bot that will use the IDs to find new category sitelinks from Wikidata, and probably a future Wikidata bot that will copy the IDs from Commons to Wikidata.

Example edits: [1], [2], [3], [4].

Thanks. Mike Peel (talk) 23:24, 14 May 2018 (UTC)[reply]

Discussion


If there are no objections, I think task should be approved. --EugeneZelenko (talk) 14:16, 24 May 2018 (UTC)[reply]