Coder Social home page Coder Social logo

buckn4gold / mediawiki-extensions-wikibase Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wikimedia/mediawiki-extensions-wikibase

0.0 0.0 0.0 177.79 MB

πŸ”— 🌐 Github mirror of MediaWiki extension Wikibase - our actual code is hosted with Gerrit (please see https://www.mediawiki.org/wiki/Developer_access for contributing)

Home Page: http://wikiba.se/

License: Other

PHP 83.08% Shell 0.06% CSS 0.66% JavaScript 10.78% PLpgSQL 0.02% Lua 0.75% Ruby 1.08% HTML 0.02% TSQL 0.24% Gherkin 1.05% Dockerfile 0.01% Vue 0.08% TypeScript 2.18%

mediawiki-extensions-wikibase's Introduction


Introduction to Wikibase

Build Status Scrutinizer Code Quality

The Wikibase.git package is part of the Wikibase software and consists of three interconnected extensions:

  • Wikibase Repository (in the directory repo)
  • Wikibase Client (in the directory client)
  • WikibaseLib (in the directory lib)

These extensions allow for the creation, maintenance, dissemination, and usage of structured data in MediaWiki.

The repo is the extension for the repository. It allows the creation and maintenance of structured data. This is being used on wikidata.org.

The client is the extension for the client. It allows several MediaWiki instances to use data provided by a Wikidata instance. Usually, you would not use them in a single wiki. This is being used on the Wikipedias.

The lib bundles common code that is used by both the client and the repo.

Install

This package contains three interrelated MediaWiki extensions:

  • Wikibase (in the subdirectory repo)
  • WikibaseLib (in the subdirectory lib)
  • Wikibase Client (in the subdirectory client)

If you are running Wikibase with hhvm, you need to enable zend compat in your php.ini:

hhvm.enable_zend_compat = true

Wikibase depends on various libraries such as DataValues components, and uses Composer to make it easy to install and manage those.

Once you have Wikibase in your MediaWiki extensions directory, add the composer.json of Wikibase to composer.local.json at the root of your mediawiki folder, as documented in MediaWiki's Composer documentation.

It should now look similar to:

{
  "extra": {
    "merge-plugin": {
       "include": [
         "extensions/Wikibase/composer.json"
       ]
    }
  }
}

Then, in the root of your mediawiki folder, run:

composer install

If you already ran composer install during the installation of MediaWiki, run instead:

composer update

When using ways to combine MediaWiki with the extension folders (e.g. symlinks or docker volumes) please make sure that the folders are available to composer in the same structure they are available to the webserver, too.

This will install both Wikibase Client and Repo together on the same wiki.

If you want to only have one or the other, then set $wgEnableWikibaseRepo = false or $wgEnableWikibaseClient to false for the one you don't want to enable.

Wikibase also depends on several JavaScript libraries. They are included in this repository as submodules. To fetch files of these libraries, you might need to run, in the Wikibase extension folder, the following command:

git submodule update --init

Development

Wikibase uses tools to ensure the quality of software developed. To invoke these tools, inside the Wikibase folder, run

composer install
composer run-script test

As this uses development dependencies and custom configuration, executing it from the MediaWiki root folder (via composer run-script test extensions/Wikibase) will not work satisfactorily

JavaScript

Wikibase makes use of frontend software from various eras - resulting in a heterogenous technological landscape.

Some notable (not a comprehensive list) mentions are

Updating vue

Wikibase exposes vue as a ResourceLoader module so it can be shared between applications. As ResourceLoader in the production environment does not have access to files only acquired through a Javascript package manager (npm), we keep a copy of its source in our repository.

To update that copy you can run the following command and commit the changes to git.

npm update vue
{
  printf '%s\n' '(function(){'
  cat node_modules/vue/dist/vue.common.prod.js
  printf '\n%s\n' '})();'
} >| lib/resources/vendor/vue2.common.prod.js
git add -f lib/resources/vendor/vue2.common.prod.js

(The surrounding IIFE is necessary to avoid Vue breaking the page in ResourceLoader’s debug mode, see T229390.)

The Wikibase software

These extensions are part of the Wikibase software created by the Wikidata team for the Wikidata project.

The Wikidata project uses the Wikibase software on its website.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.