mdbibexport.pl extracts the cited references of a Pandoc markdown document and writes a bibtex database for this document. The keys are extracted from the markdown file and written into an auxiliary file, which is used by BibTool to find the references in the bibtex (.bib) data base and to write them into a new file.
BibTool http://gerd-neugebauer.de/software/TeX/BibTool/en/, Pandoc http://www.pandoc.org/ and Perl https://www.perl.org/ have to be installed on the system. Version 2.65 of BibTool, version 1.16.0.2 of Pandoc and version 5.25 of Perl have been tested with this script.
The Perl script is run from command line:
$perl mdbibexport.pl
The name of the markdown .md file and the bibliography .bib file will be asked. The cited references will be exported as mdbibexport.bib. Temporary and auxiliary files will be named as mdbibexport.*.
General Public License (GPL), version 3.0 https://www.gnu.org/licenses/gpl-3.0.html.
0.20.
2016/12/11.
Dr. Robert Winkler.
Albert Krewinkel.