Wikidata:Requests for permissions/Bot/Pi bot 22
- 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) 19:27, 24 October 2021 (UTC)[reply]
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: Regularly add Commons category links for date categories/items
Code: Available on BitBucket
Function details: The code runs through commons:Category:Days by day to find categories that don't have Wikidata items. It then reformats the date from the category name, e.g., "2021-10-11" to "October 11, 2021", and then searches Wikidata for a matching item. If it finds matches, it looks for a matching item with instance of (P31)=calendar day of a given year (Q47150325), and once it finds it, it adds the Commons sitelink. Since new Wikidata items and Commons categories will be created in the future, this script would be run monthly. Example edits (during semi-automatic test runs with my account): [1], [2], [3], [4]. This task was suggested by @Pigsonthewing. I could expand this to also cover creating new items where needed, if anyone thinks that would be useful (but nominally, let's stick with adding matches to existing items). Thanks. Mike Peel (talk) 16:39, 11 October 2021 (UTC)[reply]
- Support, obviously. Thanks, Mike. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 16:51, 11 October 2021 (UTC)[reply]
- Two thoughts; in addition to the monthly run, is it perhaps worth running a version daily, that only checks the prior seven calendar days? That is where most of the activity - and the most predictable activity - will be. As for creating new items, if not for every past day (that has a category on Commons), then perhaps for days from today onwards? (Or is another bot creating those items?) No worries if that's too complex, in either case. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 16:56, 11 October 2021 (UTC)[reply]
- @Pigsonthewing: The last 7 days is probably the most risky from a vandalism point of view, and hopefully users would be manually editing them anyway. For future days, I think @GZWDer: was bot-creating these, but I don't know where they got up to. Thanks. Mike Peel (talk) 17:41, 11 October 2021 (UTC)[reply]
- Two thoughts; in addition to the monthly run, is it perhaps worth running a version daily, that only checks the prior seven calendar days? That is where most of the activity - and the most predictable activity - will be. As for creating new items, if not for every past day (that has a category on Commons), then perhaps for days from today onwards? (Or is another bot creating those items?) No worries if that's too complex, in either case. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 16:56, 11 October 2021 (UTC)[reply]