mayanklahiri / bib2json

Javascript Bibtex to JSON for nodejs and the browser
65 stars 9 forks source link

bib2json

Javascript Bibtex to JSON for nodejs and the browser. It can:

Handwritten as a labor of love, not cruelly auto-generated from a grammar, tested with Jasmine.

Usage

Synchronous, block mode:

var entries = BibtexParser(text);
console.log(entries);

Asynchronous, stream mode:

var entryCallback = function(entry) { console.log(entry); }
var parser = new BibtexParser(entryCallback);
parser.parse(chunk1);
parser.parse(chunk2);