Wikimedia

Expand the pubmed regex to include digits starting from 1 in the "citoid" service

Pubmed IDs start at 1: https://www.ncbi.nlm.nih.gov/pubmed/1

However, we currently only recognise a pubmed id if it is 6 or 7 digits long. We should expand the definition in the function CitoidService.prototype.addResponseFunction in the file /lib/CitoidService.js to include these. You will have to change the regex (regular expression).

Getting Started:

citoid is a Node.js application (written in JavaScript) that retrieves information about a webpage, book, journal article, etc. given a URL to the webpage or some other identifier, like DOI (digital_object_identifier). It uses another open source project, Zotero's translation-server, also written in JavaScript, to do a lot of the work.

In order to get citoid working on your computer, you'll need to download both Node version 10.0 (for citoid) and xpcshell version 29.0 (for Zotero) to get both of them working. There are installation instructions and more information available at https://www.mediawiki.org/wiki/Citoid

(For this task, you don't strictly need to install Zotero, but the tests will fail without it installed, so you may need to install it to create the tests.)

Task tags

  • node.js
  • javascript

Students who completed this task

Geoffrey Mon

Task type

  • code Code
close

2016