KevCaz's Website

When I need to update my publication list, I usually retrieve a bibtex file (.bib) from OrcID. I used to convert this file into a YAML with pandoc-citeproc like this

$ pandoc-citeproc --bib2yaml pubs.bib > pubs.yaml

Since pandoc 2.11, pandoc-citeproc is no longer used to format citations and the repository is now archived:

Pandoc now uses the citeproc library, and no external filter is needed.

So I decided to give it a try and adjust some scripts of my own using the new way of doing the conversion. The first step was to get a newer version of Pandoc because, even in Sid, Debian currently packages Pandoc 2.9.1. So I installed the latest version manually by doing

$ wget -O /tmp/pandoc.deb
$ sudo dpkg -i /tmp/pandoc.deb

And here is the version I am now using

$ pandoc -v
pandoc 2.14.2
Compiled with pandoc-types 1.22, texmath, skylighting 0.11,
citeproc 0.5, ipynb
User data directory: /home/kevcaz/.local/share/pandoc
Copyright (C) 2006-2021 John MacFarlane. Web:
This is free software; see the source for copying conditions. There is no
warranty, not even for merchantability or fitness for a particular purpose.

Then, I had to figure out how to do the conversion! So I looked up the documentation and it is all explained in the section “Specifying bibliographic data”. Now, all I need to do for this conversion is

$ pandoc pubs.bib -s -f biblatex -t markdown > pubs.yaml  

Pretty neat! And if at some point I decide to use JSON rather than YAML, I simply edit the line above as follows

pandoc works.bib -s -f biblatex -t csljson > pubs.json

Pandoc is definitively a very important tool for me, it sure has made my life way easier over the past 7 years now.