Wikidata:Requests for permissions/Bot/BsivkoBot 3
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.
- Not done @Bsivko: This request seems to be abandoned, please reopen it if that is not the case. Thanks. Mike Peel (talk) 21:26, 18 January 2022 (UTC)[reply]
BsivkoBot edit
BsivkoBot (talk • contribs • new items • new lexemes • SUL • Block log • User rights log • User rights • xtools)
Operator: Bsivko (talk • contribs • logs)
Task/s:
- Term "видеоигра" is not correct for common description of "video game" for russian language. We can see it for ruwiki in Q7889, root (and childs) category and other cases. However, despite language differences, the first term was imported in bulk by bot(s?) (example). To fix this mistake we can use the same bot approach. And simultaneously, fill up description for empty pages.
Example of the first case and for the second one.
Code:
- I use pywikibot, and there is a function which checks the presence of mistake and fix it. For empty cases, it prepares a short description:
def process_wikidata_computergame(title):
item = get_wikidata_item("ru", title)
if not item:
return
if 'ru' in item.descriptions.keys():
if "видеоигра" in item.descriptions['ru']:
item.descriptions['ru'] = item.descriptions['ru'].replace("видеоигра", "компьютерная игра")
item.editDescriptions(descriptions=item.descriptions,
summary=u'"компьютерная игра" is a common term for "videogame" in Russian')
else:
if 'P31' in item.claims.keys():
if item.claims['P31'][0]:
if item.claims['P31'][0].target:
if item.claims['P31'][0].target.id:
if item.claims['P31'][0].target.id == 'Q7889':
item.descriptions['ru'] = item.descriptions['ru'] = "компьютерная игра"
item.editDescriptions(descriptions=item.descriptions,
summary=u'added Russian description')
pass
Function details:
--Bsivko (talk) 13:25, 8 May 2020 (UTC)[reply]
- The bot works in background with other articles, and it doesn't have broad scan. Bsivko (talk) 13:25, 8 May 2020 (UTC)[reply]