Skip to content

Latest commit

 

History

History
executable file
·
190 lines (132 loc) · 5.9 KB

File metadata and controls

executable file
·
190 lines (132 loc) · 5.9 KB

Note This repository is automatically generated from the main parser monorepo. Please submit any issues or pull requests there.

ooxast-util-parse-bib

Find and convert raw references to CSL-JSON.

Takes a bibliography array (usually of w:ps) and parses it using anystyle to CSL.

You need to either: set up an anystyle API on your own (very easy to do, just click the "Deploy to vercel" button below for a version identical to the one used in this repo) or provide the path to the anystyle executable.

Contents

What is this?

When should I use this?

Install

This package is ESM only. In Node.js (version 12.20+, 14.14+, 16.0+, 18.0+), install as

pnpm add ooxast-util-parse-bib-browser
# or with yarn
# yarn add ooxast-util-parse-bib-browser
# or with npm
# npm install ooxast-util-parse-bib-browser

Use

Options

parseBib(tree: OoxastTree, options:{
  apiUrl?: string,
  apiParams?: {param:string}[],
  anyStylePath?: string
})

If no options are provided it will try to use Anystyle on your path, and probably fail.

API


parseBib()

Signature

parseBib(tree: Node<Data>, options: Options): Promise<undefined | Data[]>;

Parameters

Name Type
tree Node<Data>
options Options

Returns

Promise<undefined | Data[]>

Defined in: lib/ooxast-util-parse-bib-browser.ts:12


Options

Properties

apiParams?

object

{
  param: string
}
Type declaration
Member Type
param string

Defined in: lib/ooxast-util-parse-bib-browser.ts:6

apiUrl

string

Defined in: lib/ooxast-util-parse-bib-browser.ts:5

headers?

object

{
  header: string
}
Type declaration
Member Type
header string

Defined in: lib/ooxast-util-parse-bib-browser.ts:7

mailto?

string

Defined in: lib/ooxast-util-parse-bib-browser.ts:8

overrideId?

boolean

Defined in: lib/ooxast-util-parse-bib-browser.ts:9

Syntax tree

Types

Compatibility

Security

Related

Contribute

License

GPL-3.0-or-later © Thomas F. K. Jorna