This little program uses pandoc to output JSON for bibtex inputs. Next we transform this to html and org markdown (or is it markup?).
Features:
- Generate simple output from bibtex (.bib)
- Use keyword filter
Bibtex is an extremely useful format for generating literature references. This little program takes the JSON output generated by pandoc-citeproc, e.g.
pandoc-citeproc --bib2json test/data/biblio.bib | ./bin/bibtex-conv -k bio1
or the later
pandoc --to=csljson test/data/biblio.bib | racket ./bin/bibtex-conv
and print it out in useful ways with racket-bibtex. Use it to generate specialised HTML references on grant proposals, biosketches, home pages etc. In earlier days I used the Ruby bibtex parser, but with pandoc there is no longer a need for that. E.g.
pandoc-citeproc --bib2json biblio.bib|bibtex-conv --keyword group
generates Org-mode style output
1. [[https://www.ncbi.nlm.nih.gov/pubmed/31278683][Scalable Workflows and Reproducible Data Analysis for Genomics]] by F. Strozzi, R. Janssen, R. Wurmus, M. R. Crusoe, G. Githinji, P. Di Tommaso, D. Belhachemi, S. Moller, G. Smant, J. Ligt and _P. Prins_, @@html:<span class="journal">@@Methods Mol Biol@@html:</span>@@ (@@html:<span class="year">@@2019@@html:</span>@@) Vol 1910 p. 723-745, DOI: 10.1007/978-1-4939-9074-0_24
which can be turned into HTML via emacs org-mode. To generate LaTeX directly it is also possible to use the –latex switch
pandoc-citeproc --bib2json biblio.bib|bibtex-conv --keyword group --latex
renders
\item Arends D, {\ul Prins P}, Jansen RC, Broman KW (2010),
\emph{R/qtl: high-throughput multiple QTL mapping.}
\uline{Bioinformatics}, {\bf 26}(23), 2990-2992.
Note that both bibtool and biber have support for manipulating bib databases. Check those first before attempting to roll your own.
Dependencies:
- racket
- pandoc
- pandoc-citeproc
guix shell -C racket ghc-pandoc ghc-citeproc
pandoc --to=csljson test.bib
Generate my CV in org markdown:
pandoc --to=csljson pjotr.bib | racket ./bin/bibtex-conv -k cv
LaTeX output:
pandoc --to=csljson pjotr.bib | racket ./bin/bibtex-conv -k cv -l
Copyright (c) 2020-2022 Pjotr Prins. This code is published under the GPL3, see LICENSE for details.