Socket
Book a DemoInstallSign in
Socket

@citation-js/plugin-quickstatements

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@citation-js/plugin-quickstatements

Plugin that takes citation-js input and output QuickStatements.

latest
Source
npmnpm
Version
0.5.5
Version published
Weekly downloads
5
-16.67%
Maintainers
1
Weekly downloads
 
Created
Source

Citation.js QuickStatements plugin

This npm package is a plugin to citation.js (see this article) that outputs bibliographic information to Wikidata QuickStatements. Some important points:

  • it does not (currently) check if the information is already in Wikidata
  • it only supports journals articles (at this moment)

Install

npm install @citation-js/plugin-quickstatements

To run the below example, you also need to install a few other packages (as they are currently not automatically pulled in, it seems):

npm install @citation-js/core @citation-js/plugin-pubmed @citation-js/plugin-doi @babel/register @babel/core

Use

Install the plugin by require-ing it:

require('@citation-js/plugin-quickstatements')

Formats

Formats and other features added by this plugin.

Input

The input is CSL generated by citation.js by any of its supported formats. Here's an example for how to create QuickStatements for a PubMed Central identifier:

c = require('@citation-js/core')
require('@citation-js/plugin-pubmed')
require('@citation-js/plugin-doi')

require('@babel/register')
require('@citation-js/plugin-quickstatements')

c.Cite.async([
  '10.1186/s13321-019-0380-5',
  'pmid:14266813',
  'PMC6613236'
])
  .then(Cite =>
    console.log(Cite.format('quickstatements'))
  )
  .catch(console.error)

Or for book ISBN numbers:

const c = require('@citation-js/core')
require('@citation-js/plugin-isbn')

require('@babel/register')
require('@citation-js/plugin-quickstatements')

c.Cite.async([
  '978-0956775016'
])
  .then(Cite =>
    console.log(Cite.format('quickstatements'))
  )
  .catch(console.error)

Output

The output is QuickStatements to be copied into the online webservice. The output looks like:

	CREATE

	LAST	P31	Q13442814
	LAST	Len	"Journal of Cheminformatics, ORCID, and GitHub"
	LAST	P304	"44"
	LAST	P356	"10.1186/s13321-019-0365-4"
	LAST	P433	"1"
	LAST	P478	"11"
	LAST	P698	"31281945"
	LAST	P932	"PMC6613236"
	LAST	P1476	"Journal of Cheminformatics, ORCID, and GitHub"
	LAST	P577	"2019-07-08"
	LAST	P2093	"Egon Willighagen"	P1545	"1"	
	LAST	P2093	"Nina Jeliazkova"	P1545	"2"	
	LAST	P2093	"Rajarshi Guha"	P1545	"3"

Keywords

Citation.js

FAQs

Package last updated on 14 May 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts