@citation-js/plugin-refworks
v0.1.2
Published
Citation.js plugin for the RefWorks Tagged Format
Downloads
15
Readme
@citation-js/plugin-refworks
This plugin adds support for the RefWorks Tagged Format.
Install
npm install @citation-js/plugin-refworks
Use
Install the plugin by require
-ing it:
require('@citation-js/plugin-refworks')
const { Cite } = require('@citation-js/core')
// ...
Formats
Input
@refworks/file
const data = Cite(`RT Journal Article
SR Electronic(1)
A1 Lars G. Willighagen
JF PeerJ Computer Science
A2 Silvio Peroni
VO 5
YR 2019
FD august 12
SP e214
T1 Citation.js: a format-independent, modular bibliography tool for the browser and command line
`)
data.format('data', { format: 'object' }) // returns:
{
author: [{ family: 'Willighagen', given: 'Lars G.' }],
editor: [{ family: 'Peroni', given: 'Silvio' }],
page: 'e214',
volume: '5',
'container-title': 'PeerJ Computer Science',
medium: 'electronic',
title: 'Citation.js: a format-independent, modular bibliography tool for the browser and command line',
issued: { 'date-parts': [[2019, 8, 12]] },
type: 'article-journal'
}
Output
refworks
data.format('refworks', { format: 'text', lineEnding: '\n' })
Options:
format
(string):'text'
(default; for plain text file) or'object'
(for array of objects)lineEnding
(string): e.g.'\n'
(default) or'\r\n'
(note that RefWorks might not pick up on the latter)