Skip to content

Latest commit

 

History

History
executable file
·
225 lines (136 loc) · 6.22 KB

README.md

File metadata and controls

executable file
·
225 lines (136 loc) · 6.22 KB

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

ooxast-util-parse-bib

npm version npm downloads

Find and convert raw references to CSL-JSON using anystyle.

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
# or with yarn
# yarn add ooxast-util-parse-bib
# or with npm
# npm install ooxast-util-parse-bib

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.ts:13


Options

Properties

anyStylePath?

string

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

apiParams?

object

{
    param: string;
}
Type declaration
Member Type
param string

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

apiUrl?

string

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

headers?

object

{
    header: string;
}
Type declaration
Member Type
header string

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

mailto?

string

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

overrideId?

boolean

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

Syntax tree

Types

Compatibility

Security

Related

Contribute

License

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