@citation-js/plugin-refworks

    0.1.2 • Public • Published

    @citation-js/plugin-refworks

    This plugin adds support for the RefWorks Tagged Format.

    NPM version Codecov NPM total downloads License

    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)

    Install

    npm i @citation-js/plugin-refworks

    DownloadsWeekly Downloads

    8

    Version

    0.1.2

    License

    MIT

    Unpacked Size

    16.3 kB

    Total Files

    7

    Last publish

    Collaborators

    • larsgw