Wikidata:Requests for permissions/Bot/DarijaBot
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) 18:42, 27 September 2021 (UTC)[reply]
DarijaBot[edit]
DarijaBot (talk • contribs • new items • new lexemes • SUL • Block log • User rights log • User rights • xtools)
Operator: Ideophagous (talk • contribs • logs)
Adding Sitelinks: The bot is already operational in the Moroccan Darija Wikipedia. One of its main tasks is editing template tags and categories, and creating new ones when necessary, based on information from Wikidata (example: birth and death year categories for persons, and their supercategories). When adding new pages though, a common problem is to link those to Wikidata. This can be unfeasible by hand in a reasonable amount of time, when hundreds of pages, e.g. categories, are added at once. The idea is to have the bot approved for Wikidata, so it can link the pages to their counterparts in other languages automatically (given a set of structured page names, or based on a mapping available in an Excel sheet). A first usecase would be the one already mentioned as an example, i.e. birth and death year categories for persons, and their supercategories.
Code: this repo.
Function details:
- get_data2: loads the mapping between years/decades and their category IDs in Wikidata, from a json file obtained with a SPARQL query. Replaced get_data which queried Wikidata directly, but the process was too slow and unncessary, since the values needed here are static.
- rebuild_dict: creates a straightforward dictionary where the year/decade is the key and the corresponding category ID is the value
- main: runs the test for 50 objects to add arywiki link to the corresponding Wikidata item
--Ideophagous (talk) 13:38, 17 September 2021 (UTC) ---- Updated --Ideophagous (talk) 08:56, 25 September 2021 (UTC)[reply]
- A first test with 50 items has been performed. The code is also now available on Github, and I've updated the function descriptions, since I have a more concrete idea about the task. --Ideophagous (talk) 08:56, 25 September 2021 (UTC)[reply]
- I am going to approve this bot in a couple of days provided no objections have been made--Ymblanter (talk) 18:47, 25 September 2021 (UTC)[reply]