QueryViz
🌻 MediaWiki extension adding a <query>
tag to display sparql queries results inside wiki pages.
Requirements
To complete
Installation
In /mediawiki-config/LocalSettings.php
, add :
# Activate QueryViz extension
wfLoadExtension( 'QueryViz' );
$wgQueryVizEndpoint = "https://lingualibre.org/bigdata/namespace/wdq/sparql"; // Or your chosen default endpoint
For Lingualibre, see also /operations
: LinguaLibre set up repository.
Update
Deploy:
- Go to host server : login
cd /opt/mediawiki/x.xx/extensions/QueryViz # x.xx being your MediaWiki version
git pull
Test on live website via private windows :
- If work : we won !
- if breaks : roll back change
git reset --hard a0d3fe6
with the correct commit id found from Github
Structure
├── bin/build.sh : building script, copies few js.
├── i18n/ : translation files
| ├── en.json : English
| ├── fr.json : French
| └── qqq.json : guides
├── includes/TagHandler.php : load config, inject queryviz base html with empty loading element.
├── modules/
| ├── ext.queryViz.QueryViz.js : call the sparql, received data, built and inject corresponding html table.
| ├── ext.queryViz.WikidataSearchWidget.js : ? <believed to not be active>
| ├── ext.queryViz.js : ?
| └── ext.queryViz.css : css
└── Hooks.php : parse page, call upon <query> the function TagHandler.php .
Contribute
- Phabricator: Lingua-libre > Query service column — tickets manager
- Github: Lingua-libre/QueryViz — code (JS)
Demo
See examples of use on LinguaLibre website: LinguaLibre:Stats, Help:SPARQL, Category:DataViz