Add support for external bibtex files

This commit is contained in:
Ludwig Schubert
2017-09-01 16:11:27 -07:00
parent 31982778f8
commit c69f39e25a
9 changed files with 162 additions and 144 deletions
+3
View File
@@ -1,5 +1,6 @@
#!/usr/bin/env node
const path = require('path');
const program = require('commander');
const jsdom = require('jsdom');
const { JSDOM } = jsdom;
@@ -20,6 +21,8 @@ JSDOM.fromFile(program.input, options).then(dom => {
const document = window.document;
const data = new transforms.FrontMatter;
data.inputHTMLPath = program.input; // may be needed to resolve relative links!
data.inputDirectory = path.dirname(program.input);
transforms.render(document, data);
transforms.distillify(document, data);