Extension:NCBITaxonomyLookup

From mediawiki.org
MediaWiki extensions manual
OOjs UI icon advanced-invert.svg
NCBITaxonomyLookup
Release status: stable
Description Pulls data from the NCBI taxonomy API into wiki pages
Author(s) Vedmaka
Latest version 1.0
MediaWiki 1.31+
Database changes No
License MIT License
Download

  • $wgNCBITaxonomyLookupApiURL
  • $wgNCBITaxonomyLookupCacheTTL
  • $wgNCBITaxonomyLookupCacheRandomizeTTL
  • $wgNCBITaxonomyApiTimeoutFallbackToCache
  • $wgNCBITaxonomyApiTimeout
  • $wgNCBITaxonomyApiKey
Translate the NCBITaxonomyLookup extension if it is available at translatewiki.net

The NCBITaxonomyLookup extension allows querying the NCBI taxonomy database and pulling the information into wiki pages.

This extension was created for WikiWorks.

Installation[edit]

  • Download and place the file(s) in a directory called NCBITaxonomyLookup in your extensions/ folder.
  • Only when installing from Git, run Composer to install PHP dependencies, by issuing composer install --no-dev in the extension directory. (See task T173141 for potential complications.)
  • Add the following code at the bottom of your LocalSettings.php :
    wfLoadExtension( 'NCBITaxonomyLookup' );
    
  • Run the update script which will automatically create the necessary database tables that this extension needs.
  • Yes Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Configuration[edit]

This extension has the following configuration parameters:

  • $wgNCBITaxonomyLookupApiURL - NCBI API URL (defaults to https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi)
  • $wgNCBITaxonomyLookupCacheTTL - Query cache TTL (default: 0)
  • $wgNCBITaxonomyLookupCacheRandomizeTTL - Set to true to randomize the TTL for each cache entry to prevent server overload if all items expire simultaneously
  • $wgNCBITaxonomyApiTimeoutFallbackToCache - Fallback to cached value if the remote is unavailable or failed to be fetched
  • $wgNCBITaxonomyApiTimeout - Timeout for API queries (default: 60)
  • $wgNCBITaxonomyApiKey - API key

Usage[edit]

Use the #taxonomy parser function to query specific taxonomy item fields:

  • 1st parameter is the subject taxonomy ID
  • 2nd parameter is the XML path to query against
{{#taxonomy:8371|Taxon/TaxId}} <!-- fetches the TaxId of the 8371 taxonomy item -->