Find and convert raw references to CSL-JSON using `anystyle`.
npm install ooxast-util-parse-bib> Note
> This repository is automatically generated from the main parser monorepo. Please submit any issues or pull requests there.
 
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.
- ooxast-util-parse-bib
- Contents
- What is this?
- When should I use this?
- Install
- Web API
- Locally
- Use
- Options
- API
- Syntax tree
- Types
- Compatibility
- Security
- Related
- Contribute
- License
This package is ESM only. In Node.js (version 12.20+, 14.14+, 16.0+, 18.0+), install as
``bash`
pnpm add ooxast-util-parse-bibor with yarn
yarn add ooxast-util-parse-bib
or with npm
npm install ooxast-util-parse-bib
`ts`
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.
---
#### Signature
`ts`
parseBib(tree: Node, options: Options): Promise
#### Parameters
| Name | Type |
| :-------- | :------------------------------ |
| tree | Node<Data> |options
| | Options |
#### Returns
Promise<undefined | Data[]>
Defined in: lib/ooxast-util-parse-bib.ts:13
---
#### Properties
##### anyStylePath?
> string
Defined in: lib/ooxast-util-parse-bib.ts:8
##### apiParams?
> object
`ts`
{
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
`ts`
{
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
GPL-3.0-or-later © Thomas F. K. Jorna
[unified]: https://unifiedjs.com
[unifiedgh]: https://github.com/unifiedjs/unified
[xast-from-xml]: https://github.com/syntax-tree/xast-util-from-xml
[rehype]: https://github.com/rehypejs/rehype
[rejour]: https://github.com/TrialAndErrorOrg/parsers/tree/main/libs/rejour
[rejour-parse]: https://github.com/TrialAndErrorOrg/parsers/tree/main/libs/rejour/rejour-parse
[rejour-stringify]: https://github.com/TrialAndErrorOrg/parsers/tree/main/libs/rejour/rejour-stringify
[rejour-move-abstract]: https://github.com/TrialAndErrorOrg/parsers/tree/main/libs/rejour/rejour-move-abstract
[rejour-meta]: https://github.com/TrialAndErrorOrg/parsers/tree/main/libs/rejour/rejour-meta
[rejour-relatex]: https://github.com/TrialAndErrorOrg/parsers/tree/main/libs/rejour/rejour-relatex
[relatex]: https://github.com/TrialAndErrorOrg/parsers/tree/main/libs/relatex
[ooxast-util-to-jast]: https://github.com/TrialAndErrorOrg/parsers/tree/main/libs/relatex/ooxast-util-to-jast
[jast]: https://github.com/TrialAndErrorOrg/parsers/tree/main/libs/rejour/jast
[jast-util-to-texast]: https://github.com/TrialAndErrorOrg/parsers/tree/main/libs/rejour/jast-util-to-texast
[jastscript]: https://github.com/TrialAndErrorOrg/parsers/tree/main/libs/rejour/jastscript
[texast]: https://github.com/TrialAndErrorOrg/parsers/tree/main/libs/relatex/texast
[texast-util-to-latex]: https://github.com/TrialAndErrorOrg/parsers/tree/main/libs/relatex/texast-util-to-latex
[hast]: https://github.com/syntax-tree/hast
[xast]: https://github.com/syntax-tree/xast
[mdast]: https://github.com/syntax-tree/mdast
[mdast-markdown]: https://github.com/syntax-tree/mdast-util-to-markdown
[latex-utensils]: https://github.com/tamuratak/latex-utensils
[latexjs]: https://github.com/latexjs/latexjs
[reoff]: https://github.com/TrialAndErrorOrg/parsers/tree/main/libs/reoff
[reoff-parse]: https://github.com/TrialAndErrorOrg/parsers/tree/main/libs/reoff/reoff-parse
[reoff-rejour]: https://github.com/TrialAndErrorOrg/parsers/tree/main/libs/reoff/reoff-rejour
[ooxast]: https://github.com/TrialAndErrorOrg/parsers/tree/main/libs/ooxast/ooxast
[ooxast]: https://github.com/TrialAndErrorOrg/parsers/tree/main/libs/ooxast/ooxast-util-to-jast