Extension:Mendeley

Category:Unmaintained extensions#Mendeley Category:Extensions without an imageCategory:Extensions without a compatibility policyCategory:GPL licensed extensions
MediaWiki extensions manual
Mendeley
Release status: unmaintainedCategory:Unmaintained extensions
Implementation Parser function Category:Parser function extensions
Description Pulls data from the Mendeley API into wiki pages
Author(s) Nischay Nahata (Nischayn22talk)
Latest version 0.1 (March 2018)
MediaWiki 1.25+Category:Extensions with manual MediaWiki version
PHP 5.3+
Database changes No
License GNU General Public License 2.0 or later
Download Category:Extensions in GitHub version control
$wgMendeleyConsumerKey, $wgMendeleyConsumerSecret
Category:All extensionsCategory:Extensions not in ExtensionJson

The Mendeley extension uses parser functions to pull data from the Mendeley API into wiki pages. Mendeley is an academic reference manager. It also provides a form input when used with the PageForms extension to search and add a document.

Installation

  • Download and place the file(s) in a directory called Mendeley in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php file:
    wfLoadExtension( 'Mendeley' );
    $wgMendeleyConsumerKey = /* Mendeley Application KEY GOES HERE */;
    $wgMendeleyConsumerSecret = /* Mendeley Application Secret GOES HERE */;
    
  • Yes Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Configuration parameters

$wgMendeleyConsumerKey
(Required) Your Application ID from Mendeley
$wgMendeleyConsumerSecret
(Required) Your Application Secret from Mendeley

To get these values you need to Login and Register an application here: http://dev.mendeley.com/myapps.html

Usage

The mendeley parser function takes three parameters, in the form of {{#mendeley:doi=DOI|id=ID|parameter=PARAMETER}}.

Where one of id or doi is required to identify the document and "parameter" is the name of the parameter that should be displayed. The full list of parameters is available here.

To define an input in a PageForms form you need to add the following wikitext: {{{field|mendeley title|input type=mendeley}}} This will show as two input fields - the first one will let you search for a document using autocomplete and the second one will auto-fill with the ID on selection of any document.

Examples

  • This example displays the title of the document:

{{#mendeley:doi=10.1103/PhysRevA.20.1521|parameter=title}} → Laser cooling of atoms

  • First name of all authors:

{{#mendeley:id=04d48d5f-d664-3a17-b004-1503cca53802|parameter=authors;first_name}} → D. J.,Wayne M

  • Example to combine first and last names (Uses Variables extension):

{{#vardefine:i|0}}{{#arraymap:{{#mendeley:{{{doi|}}}|authors;last_name}}|,|xyz| :[[Author::{{#explode:{{#mendeley:{{{doi|}}}|authors;first_name}}|,|{{#var:i}}}} {{#explode:{{#mendeley:{{{doi|}}}|authors;last_name}}|,|{{#var:i}}}}]] {{#vardefine:i|{{#expr:{{#var:i}}+1}} }} |\n}}

Category:All extensions Category:Extensions in GitHub version control Category:Extensions not in ExtensionJson Category:Extensions with manual MediaWiki version Category:Extensions without a compatibility policy Category:Extensions without an image Category:GPL licensed extensions Category:LoadExtensionSchemaUpdates extensions Category:ParserFirstCallInit extensions Category:Parser function extensions Category:Unmaintained extensions