Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/plus1tv/bibtex-bibjson
📚 A tool to convert BibTeX documents to BibJSON.
https://github.com/plus1tv/bibtex-bibjson
bibjson bibtex converter json latex parser transpiler
Last synced: about 1 month ago
JSON representation
📚 A tool to convert BibTeX documents to BibJSON.
- Host: GitHub
- URL: https://github.com/plus1tv/bibtex-bibjson
- Owner: plus1tv
- License: mit
- Created: 2019-07-08T03:13:09.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-03-31T00:04:43.000Z (over 1 year ago)
- Last Synced: 2024-10-14T11:36:19.978Z (3 months ago)
- Topics: bibjson, bibtex, converter, json, latex, parser, transpiler
- Language: PEG.js
- Homepage: https://codepen.io/alaingalvan/pen/agjaLo
- Size: 1.63 MB
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 5
-
Metadata Files:
- Readme: readme.md
- License: license.md
Awesome Lists containing this project
README
# BibTex-BibJson
[![Npm Package][npm-img]][npm-url]
[![License][license-img]][license-url]## Installation
```bash
npm i bibtex-bibjson -S
```A tool to convert BibTeX citations to [BibJSON](http://okfnlabs.org/bibjson/).
## Usage & Demo
Check out our [Demo](https://codepen.io/alaingalvan/pen/agjaLo) to try it out for yourself!
```ts
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
```bib
@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:
```json
{
"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.
[npm-img]: https://img.shields.io/npm/v/bibtex-bibjson.svg?style=flat-square
[npm-url]: http://npm.im/bibtex-bibjson
[license-img]: https://img.shields.io/:license-mit-blue.svg?style=flat-square
[license-url]: https://opensource.org/licenses/MIT