Skip to content

Instantly share code, notes, and snippets.

@bodokaiser
Created May 21, 2017 13:35
Show Gist options
  • Save bodokaiser/673c7b8c9ab7247f8a1f2203e6572873 to your computer and use it in GitHub Desktop.
Save bodokaiser/673c7b8c9ab7247f8a1f2203e6572873 to your computer and use it in GitHub Desktop.
<html>
<head></head>
<body>
<ul></ul>
<script>
const PARSER = 'https://raw.githubusercontent.com/ORCID/bibtexParseJs/master/bibtexParse.js'
fetch(PARSER)
.then(res => res.text())
.then(eval)
.then(() => {
let list = document.querySelector('ul')
fetch('literature.bib')
.then(res => res.text())
.then(bibtex => {
bibtexParse.toJSON(bibtex)
.forEach(cit => {
let t = cit.entryTags
list.innerHTML += `<li>${t.author}. ${t.year}. ${t.title}</li>`
})
})
})
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment