npm i bibtex-bibjson -S
A tool to convert BibTeX citations to BibJSON.
Check out our Demo to try it out for yourself!
import { openFileSync } from 'fs';
import { parse } from 'bibtex-bibjson';
// Read file as string
let bibTexStr = openFileSync('./citations.bib');
// {} Convert to BibJson
// function parse(bibTexStr: string): object
let bibJson: Object = parse(bibTexStr);
@article{hasselgren2020,
author = {Hasselgren, Jon and Munkberg, J. and Salvi, Marco and Patney, A. and Lefohn, Aaron},
year = {2020},
title = {Neural Temporal Adaptive Sampling and Denoising},
journal = {Computer Graphics Forum}
}
Becomes:
{
"hasselgren2020": {
"author": [
{ "name": "Jon Hasselgren" },
{ "name": "J. Munkberg" },
{ "name": "Marco Salvi" },
{ "name": "A. Patney" },
{ "name": "Aaron Lefohn" }
],
"year": 2020,
"title": "Neural Temporal Adaptive Sampling and Denoising",
"journal": "Computer Graphics Forum"
}
}
bibtex-bibjson is licensed as either MIT or Apache-2.0, whichever you would prefer.