Skip to content

Mediaiwki Extension to get info from Google Knowledge Graph. Developed only for education purposes: it is not suitable for real usage

License

Notifications You must be signed in to change notification settings

Griboedow/GoogleKnowledgeGraph

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GoogleKnowledgeGraph MediaWiki extension adds tooltips with short description about specified terms. The description received automatically from Google Knowledge Graph.

Main purpose of the extension is to show on a simple example how to develop MediaWiki extensions, that is why you see quite many comments for each and every method.

There is a Russian article with detailed description of the extension development: https://habr.com/ru/company/veeam/blog/544534/

Warning

The extension is provided only for education purposes. Using it in production is not recommended: Google provides only 100 000 requests for free.

Installation and configuration

To install the extension, place the folder in ./extensions and add in LocalSettings.php:

wfLoadExtension( 'GoogleKnowledgeGraph' );
$wgGoogleApiToken = 'your-google-token';
$wgGoogleApiLanguage = 'en';

Where to get Google API token

You can get token on: https://console.cloud.google.com/flows/enableapi?apiid=kgsearch.googleapis.com&credential=client_key

Usage

To use the extension add on a page tag:

<GoogleKnowledgeGraph query="Mario">

and save the page

You'll get something like that: GKG_sample

About

Mediaiwki Extension to get info from Google Knowledge Graph. Developed only for education purposes: it is not suitable for real usage

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published