dlindem / zotwb

an app for connecting a Zotero group library to a Wikibase
Creative Commons Attribution Share Alike 4.0 International
7 stars 0 forks source link
wikibase wikibase-api zotero zotero-api

ZotWb_logo ZotWb

A python app for LODifying bibliographical data, involving Zotero, Wikibase, and Wikidata

This work is being supported by a WMF Rapid Grant.

See a short video demo here.

This tool exports records in a Zotero group library to a custom Wikibase, prepares datasets to be sent to OpenRefine, and feeds OpenRefine reconciliaton results back to the Wikibase. Wikidata is envolved in the entity reconciliation.

It contains a range of functions for interaction with any Zotero group library and any Wikibase instance; some of them are potentially useful for any Zotero groups user (item batch edit, tag delete), and for any Wikibase user (Wikidata properties alignment, Import (cloning) of Wikidata entities).

Zotero records are processed in the following way:

The Zotero item type (e.g. 'book section' or 'journal article') and the publication language are by default LODified (i.e., represented as ontology items, not literals). Missing or unmapped language values are fixed on the fly by the user.

Creator names, or any 'string' property you specify are prepared for entity reconciliation using OpenRefine. Reconciliation results from Wikidata and/or from your own Wikibase (that makes sense if the entities you want to find already exist on your Wikibase) are accepted for re-feeding your Wikibase.

Identifiers (the Zotero Item ID, ISBN, ISSN, OCLC, and what you specify that my occur in the EXTRA field) are normalized and linked using 'external-id' properties.

A detailed documentation is given in the chapters in the doc folder, and also on SSHOC Marketplace.

Installation

This section explains what is necessary to start using ZotWb:

Current limitations

This very first version of ZotWb was developed and tested on Ubuntu 23.10 Linux, and python 3.11. If you are on a different platform, install a virtual linux machine, and work on that. ZotWb includes a fork of A. Delpeuch's OpenRefine-Wikibase, which relies on the linux architecture and some linux packages.

ZotWb works out of the box for Wikibase Cloud instances. For self-hosted Wikibases (Docker or manual install), the configuration file config.json (profile folder) will have to be manually edited (Please contact us for allowing the necessary configurations by default in a forthcoming version).

Installation steps

On debian-based systems like Ubuntu, commands that cover all this look as follows:

sudo apt install git redis-server python3 virtualenv libpython3-dev
git clone https://github.com/dlindem/zotwb
cd zotwb
python3 -m venv .zotwbenv
source .zotwbenv/bin/activate
pip3 install -r requirements.txt

If the above steps have been successful, you should be able to run ZotWb with the following command in your terminal:

python3 -m zotwb

In subsequent sessions, you need to activate the virtual environment again, and start ZotWb:

cd zotwb
source .zotwbenv/bin/activate
python3 -m zotwb

You need to leave the terminal running. In the terminal, you can follow what ZotWb does by looking at the action log output displayed in the terminal. You can stop zotwb using CTRL+C in the terminal.

If ZotWb is running, point your browser to http://127.0.0.1:5000/.

If you prefer to install, create the virtual environment and run ZotWb inside an application like PyCharm, after opening the cloned project folder, it looks like that:

Pycharm_screenshot

Configuration of the tool

ZotWb will guide you through the configuration process, which consists of the following steps:

Screenshots

This is how the starting page looks for a profile that connects to MLV Wikibase. Another Wikibase where this tool is used is LexBib Wikibase.

Startpage_screenshot

This is how the Zotero export page looks like:

Exportpage_screenshot

This is how the Wikidata entity import function looks like:

wdimport_screenshot