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).
- MediaWiki 1.43+
- MySQL has been fully tested. MariaDB, PostgreSQL and SQLite may work but have not been tested.
- Scribunto
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.
- Enable the extension using
wfLoadExtension( 'Bucket' ); - Run
update.phpto create the required database tables - Create a new database user for Bucket, e.g
CREATE USER 'bucket'@'<SERVER_HOSTNAME>' IDENTIFIED BY '<PASSWORD>';- Ensure the configuration variables are set correctly (see table below)
- Run
php maintenance/run.php Bucket:SetupDBPermissionto setup required database permissions
| 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 |