bibtex-bibjson
v0.2.0
Published
📚 A tool to convert BibTeX documents to BibJSON.
Downloads
17
Maintainers
Readme
BibTex-BibJson
Installation
npm i bibtex-bibjson -S
A tool to convert BibTeX citations to BibJSON.
Usage & Demo
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);
Example
@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",
}
}
License
bibtex-bibjson is licensed as either MIT or Apache-2.0, whichever you would prefer.