Extension:WikibaseStatementUpdater

MediaWiki extensions manual
WikibaseStatementUpdater
Release status: beta
Implementation Special page
Description Lets you update and add Wikibase statements using the QuickStatements V1 format
Author(s) Niklas Laxström (Nikerabbittalk)
Latest version 1.0.0 (20201212)
Compatibility policy Master maintains backward compatibility.
MediaWiki 1.35
PHP 7.3
Database changes Yes
Tables wsu_batch
wsu_batchlist
License GNU General Public License 2.0 or later
Download
  • $wgWSUClientConfig
Quarterly downloads 2 (Ranked 138th)
Translate the WikibaseStatementUpdater extension if it is available at translatewiki.net

Tool for both updating and adding Wikibase statements using QuickStatements V1 format. As of version 1.0.0, only properties are supported. To update an existing statement, there must only be one statement for that property. If there are multiple, no change will be done. If there is none, a new statement will be added.

Installation

edit
  • Download and move the extracted WikibaseStatementUpdater folder to your extensions/ directory.
    Developers and code contributors should install the extension from Git instead, using:cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/WikibaseStatementUpdater
  • Only when installing from Git, run Composer to install PHP dependencies, by issuing composer install --no-dev in the extension directory. (See task T173141 for potential complications.)
  • Add the following code at the bottom of your LocalSettings.php file:
    wfLoadExtension( 'WikibaseStatementUpdater' );
    
  • Run the update script which will automatically create the necessary database tables that this extension needs.
  •   Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Configuration

edit

You need to create a consumer for this tool using Special:OAuthConsumerRegistration/propose with the following details:

  • Name (you can choose)
  • Description (up to you)
  • OAuth protocol version: 1.0a
  • Callback URL: Full path to your Special:WikibaseStatementUpdater page
  • Use as a prefix: no
  • Grants are the same as for QuickStatements and OpenRefine, basically:
    • High-volume editing
    • Edit existing pages
    • Create, edit, and move pages
$wgWSUClientConfig
Set this to an array with keys key and secret for the consumer key and secret respectively.

User rights

edit

The extension itself does not require any user rights. It works through OAuth so the user must have permissions to update Wikibase items.