pcooksey / bibtex-js

BibTeX-js can parse a BibTeX-file and render it as part of an HTML file. This way, you can easily add a list of publications to your private homepage or display a list of recommended publications for a seminar. The way the entries are display can be customized using a simple template system and CSS.
MIT License
270 stars 68 forks source link

can I use this in node.js #58

Closed anyuzx closed 4 years ago

anyuzx commented 4 years ago

Hello, I am wondering can this be used in node.js? thank you.

pcooksey commented 4 years ago

I'm not very familiar with node.js. Basically it lets you run javascript on server-side (rather than client-side). I don't really see what you'd get from running bitex-js server-side. Bibtex-js is built on the assumption of having the DOM tree and as such html elements to write the bibtex entry information into. You'd have to somehow have node.js replicate the DOM, generate the html elements, and then send the html page to the client (no idea if that is possible). You wouldn't have any of the search capabilities though as those have to be client-side.

anyuzx commented 4 years ago

@pcooksey Thank you for your answer. I was trying to see whether I can use it to parse a BibTeX entry and get an object containing keys like title, author, etc, and then use them in a template to generate HTML pages. Now I understand what this module is designed to do as you explained. Thank you.