Skip to content

weirdgloop/mediawiki-extensions-Bucket

Repository files navigation

Bucket

Simple MediaWiki extension to store and retrieve structured data on articles.

Bucket was developed as a lightweight alternative to Semantic MediaWiki, as there are several issues with SMW that can cause issues on wikis that use it quite extensively like the RuneScape Wiki. For example, SMW frequently writes to the database even when no content is changed, has its own purging mechanism, and requires users to learn quite complicated syntax to use.

Bucket aims to be simpler in nature, by providing a very straight forward interface for wiki editors to store structured data, an easy-to-learn SQL-like syntax in Lua for accessing the data, and crucially, not redeveloping the wheel and riding on top of existing MediaWiki concepts where possible (such as RDBMS access, purging, etc).

Requirements

  • MediaWiki 1.43+
  • MySQL has been fully tested. MariaDB, PostgreSQL and SQLite may work but have not been tested.
  • Scribunto

Installing

Bucket is still under active development, and the API and schema are unstable and may change at any time. We strongly recommend not using Bucket in production yet, but if you do, please let us know, so we can let you know about breaking changes when they happen.

  1. Enable the extension using wfLoadExtension( 'Bucket' );
  2. Run update.php to create the required database tables
  3. Create a new database user for Bucket, e.g
CREATE USER 'bucket'@'<SERVER_HOSTNAME>' IDENTIFIED BY '<PASSWORD>';
  1. Ensure the configuration variables are set correctly (see table below)
  2. Run php maintenance/run.php Bucket:SetupDBPermission to setup required database permissions

Configuration

Variable Description Default
$wgBucketDBuser The username Bucket will use to connect to the database. None
$wgBucketDBpassword The password for the Bucket database user. None
$wgBucketDBhostname The hostname for the Bucket database user. %
$wgBucketMaxQueryExecutionTime The maximum time in milliseconds that an individual query is allowed to run before timing out. 500
$wgBucketMaxPageExecutionTime The maximum time in milliseconds that Bucket is allowed to execute per page parse. 10,000
$wgBucketMaxDataPerPage The maximum amount of data storable by a single page, counted as the length of the JSON encoded data. 1,000,000
$wgBucketWriteEnabledNamespaces An array of namespaces that Bucket will write data from. (Main), User, Project, File, Help, and Category

Usage

For detailed usage, see this page.

About

Bucket is a MediaWiki extension that lets you store structured data on articles, which can be queried by other articles and APIs.

Resources

License

Security policy

Stars

Watchers

Forks

Languages