Wikidata:Requests for permissions/Bot/Pi bot 6
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--Ymblanter (talk) 10:34, 14 July 2018 (UTC)[reply]
Pi bot 6[edit]
Pi bot (talk • contribs • new items • new lexemes • SUL • Block log • User rights log • User rights • xtools)
Operator: Mike Peel (talk • contribs • logs)
Task/s: Move commons sitelinks from topic to category items
Code: Available on BitBucket
Function details: The code looks for items with a value for topic's main category (P910) and a commons sitelink to a category. It then checks that the P910 item does not already have a commons sitelink, and that it has a category's main topic (P301) value that points back to the first item. If everything looks good, then it removes the sitelink from the first item (e.g., [1]) and adds it to the second one (e.g., [2]). As a bonus, it also adds an English label to the second item (if it doesn't already have one) using the commons category name (e.g., [3]). The intention would be to run this daily. I'm ready to do a test run, but this might be worth discussing this a bit first. Pinging @Ghouston, Jmabel, Jheald: as editors that might be interested in commenting on this. Thanks. Mike Peel (talk) 01:47, 12 June 2018 (UTC)[reply]
- That seems fine; you should also check that the Commons category (P373) statement on the main item is present and with the right value. It would also be worth checking that main item Commons category (P373) is correct when the Commons category is already sitelinked to the category item, but that may be a separate potential task. Ghouston (talk) 02:51, 12 June 2018 (UTC)[reply]
- @Ghouston: The bot checks for mismatches that are caused by links to category redirects, which it then fixes. I need to see more examples before I can code anything more complicated than that, can you point me to any? Thanks. Mike Peel (talk) 03:13, 12 June 2018 (UTC)[reply]
- If the P373 value is different to the sitelink, often it will be because the Commons category was renamed which is why it will point to a redirect. So fixing those is good. Maybe you can just make a log of other cases where it differs and see if there's a pattern. Ghouston (talk) 03:28, 12 June 2018 (UTC)[reply]
- @Ghouston: The bot checks for mismatches that are caused by links to category redirects, which it then fixes. I need to see more examples before I can code anything more complicated than that, can you point me to any? Thanks. Mike Peel (talk) 03:13, 12 June 2018 (UTC)[reply]
- Can we take a step back to the intent here (in relatively non-technical terms)? Am I correct that this is relevant only when there is a category with a "main topic," the category and main topic both have Wikidata items, there is both a Commons gallery page and a Commons category, and initially the "main topic" item has a sitelink to the Commons category? And that the intent here is to (1) remove the existing
goes[sitelink - ed.] from the "main topic" item to the Commons category and (2) add instead a sitelink that goes from the "category" item to the Commons category? I'm not 100% convinced that's a good idea, but before I discuss that further, I want to make sure I understand what is being proposed. - Jmabel (talk) 03:21, 12 June 2018 (UTC)[reply]- @Jmabel: That's right except for "there is both a Commons gallery page and a Commons category" and "(2) add instead a sitelink that goes from the "category" item to the Commons category". The code does not care if a gallery item exists or not, it just moves the commons categories over to category items where they exist. It's based on the principle that commons categories should be sitelinked with category items where possible, which people here seem to want. I don't mind either way (and nor does the wikidata infobox on commons), but it seems to me that the wikidata community wants this to be the way we organise the categories, then it should be sorted out by a bot rather than by manual edits. Thanks. Mike Peel (talk) 22:38, 15 June 2018 (UTC)[reply]
- But, as I understand it, the Commons community almost entirely wants it the other way. Again, the near-universal consensus in the Commons community is that Commons categories (except for meta-categories) are generally analogous to Wikipedia articles, not Wikipedia categories, and that Commons galleries are a very minor part of Commons. - Jmabel (talk) 22:47, 15 June 2018 (UTC)[reply]
- This is sounding like it needs an RfC. @Lydia Pintscher (WMDE):, what do you think? Thanks. Mike Peel (talk) 22:58, 15 June 2018 (UTC)[reply]
- I don't have an opinion either way but it comes up again and again indeed. There are arguments to be made for both. --Lydia Pintscher (WMDE) (talk) 14:21, 16 June 2018 (UTC)[reply]
- This is sounding like it needs an RfC. @Lydia Pintscher (WMDE):, what do you think? Thanks. Mike Peel (talk) 22:58, 15 June 2018 (UTC)[reply]
- But, as I understand it, the Commons community almost entirely wants it the other way. Again, the near-universal consensus in the Commons community is that Commons categories (except for meta-categories) are generally analogous to Wikipedia articles, not Wikipedia categories, and that Commons galleries are a very minor part of Commons. - Jmabel (talk) 22:47, 15 June 2018 (UTC)[reply]
- @Jmabel: That's right except for "there is both a Commons gallery page and a Commons category" and "(2) add instead a sitelink that goes from the "category" item to the Commons category". The code does not care if a gallery item exists or not, it just moves the commons categories over to category items where they exist. It's based on the principle that commons categories should be sitelinked with category items where possible, which people here seem to want. I don't mind either way (and nor does the wikidata infobox on commons), but it seems to me that the wikidata community wants this to be the way we organise the categories, then it should be sorted out by a bot rather than by manual edits. Thanks. Mike Peel (talk) 22:38, 15 June 2018 (UTC)[reply]
- Support no, not another RFC, this just derailed the discussion. We have been there, we've done that and this is what came out of it. Jmabel is just late to the party and missed it. Multichill (talk) 10:27, 5 July 2018 (UTC)[reply]
- Support what Multichill said. — billinghurst sDrewth 21:38, 9 July 2018 (UTC)[reply]
- We need to move forward. I am going to approve this in a couple of days provided there have been no new objections raised, and if we need additional discussions on Commons category vs gallery, these must be held elsewhere, not on the bot request page. I am sure we can always roll these changes back if there is community consensus to do so.--Ymblanter (talk) 18:54, 11 July 2018 (UTC)[reply]