Overview

I had the opportunity to try out the following WikibaseSync, so this is a personal note for future reference.

https://github.com/the-qa-company/WikibaseSync

I learned about this tool from the following paper.

https://doi.org/10.11517/jsaisigtwo.2022.SWO-056_04

Installation

Install the source code and related libraries.

!c!gdpeitWpickilinobsnatesaelhSltytn-pcrs:r/e/qguiitrheumbe.nctosm./ttxhte-qa-company/WikibaseSync

Creating a Bot Account

Access the Wikibase prepared in advance, and click “Bot passwords” from “Special pages”.

On the following screen, enter the “Bot name”.

On the next screen, check the following three items.

Give him the follwing rights: “High-volume editing”, “Edit existing pages” and “Create, edit, and move pages”

As a result, the following message is displayed and you can obtain the password.

TT(RhhFeeeotrubnroeontwldtppoaabssoSsstpwwseoocrrwiddhailftc:oohBrolrtboePogqatusiisnnrwaeomwreitdths"he.WiNlkaoikgdaiamntuarnUaap@mdWeaitkteiord"abteoafUtphudesaetsrearm"eNiasaksaxmxtuxhrxeax"xexvwxeaxnsxtxucxarxlexa.utsePedlr.enaasmee,reycoourdcatnhiaslsfoorusfeutNuarkeamruerfaeraesncues.ernameandWikidataUpdater@xxxxxxxxxxxxxxaspassword.)

Then, following the instructions below, enter the Bot information in the configuration file of the installed source code.

https://github.com/the-qa-company/WikibaseSync#setup

Example: user-config.py

(u'Nakamura',BotPassword(u'WikidataUpdater',u'xxxxxxxxxxxxxx'))

Example: config/application.config.ini

This is a usage example with wikibase.cloud.

[S[usdpaepDewsporpnrvErieamoitoeFvkrratUiprAeiqiortewUrb=lnclyrrLAaEo=UtiTlsan=lryt]ieddhiUev]mPn=t=rLeioathioInikhpt=cnnatsthattmt:ptleup/stCr=rs/:phvan/saah1a/:nlt9kn/gt6aa/e=p.mknsswuaa4:irmk=5/kaua/i1rmfnb9auaaa61rlks.9asaew61em.i.9uckw6rlii.aobkw1uaii9dsbk6eai..sbwceail.skoceiul.bdcaulswde/u.aedcpn/litpo.iruptodhyp/pquery/sparql

Usage Example

Let’s try running the following.

python import_one.py Q107095935

As a result, data was registered as follows.

https://nakamura196.wikibase.cloud/wiki/Item:Q42

WikibaseSync appeared to automatically add the following property.

https://nakamura196.wikibase.cloud/wiki/Property:P14

It appeared to map between the Wikibase instance created this time and Wikidata IDs via the above property.

However, the information registered above appears to be insufficient. After execution, the following errors occurred and the program does not appear to have completed.

CRITICAL: Exiting due to uncaught exception <class ‘pywikibot.exceptions.NoPageError’>

CRITICAL: Exiting due to uncaught exception <class ‘KeyError’>

A similar issue was found, but it was not resolved.

https://github.com/the-qa-company/WikibaseSync/issues/18

Summary

I tried out WikibaseSync. Since I was only able to get it to work partially, I would like to continue investigating.