This is an open-source project developed by The QA Company.
You can use this project to sync Wikidata Items and Properties with your arbitrary Wikibase.
This tool is actively used at https://linkedopendata.eu.
- Import Wikidata Items and Properties
- Track the changes on Wikidata and Keep synchronized
- Keep external links to Wikidata
This is just a standard setup of the python repo using virtual enviroments
- ensure you have python3 and sudo yum install python3-develorsudo apt install python3-dev
- sudo apt install virtualenv
- virtualenv venv --python=python3
- source venv/bin/activate
- pip install -r requirements.txt
This is the standard procedure to create a Bot Account on Wikibase. The Account is responsible for making the edits.
- Login in the Wikibase instance (for example using the admin account)
- Go to "Special Pages" -> "Bot passwords" and type the name of your bot (for example WikidataUpdater)
- Give him the follwing rights: "High-volume editing", "Edit existing pages" and "Create, edit, and move pages"
- Copy your username in "user-config.py"
- Copy your username, the name of the bot and the password in "user-password.py"
- Update the application.config.ini  [config/application.config.ini]
Define the Wikibase properties in this file.
located in
config/application.config.iniin the repositoryCustomize this file based on your Wikibase properties. Check the example properties below (it matches the default properties of a Wikibase Docker installation)
[wikibase] user = admin sparqlEndPoint = http://localhost:8834/proxy/wdqs/bigdata/namespace/wdq/sparql domain = localhost:80 protocol = http apiUrl= http://localhost:80/w/api.php entityUri=http://wikibase.svc/entity propertyUri=http://wikibase.svc/prop
- python import_one.py Q1to import Q1 from Wikidata (if already imported the entity will be put in sync)
- python import_one.py P31to import P31 from Wikidata (if already imported the entity will be put in sync)
- python import_all_changes.pyto sync all currently imported items
- python import_recent_changes.pyto sync all entities that where changed in Wikidata (calling this regularly allows to maintain all instances and properties in sync with Wikidata)