A small utility that uses BibTool to extract only the works cited in a Pandoc Markdown file from a BibTeX file.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
Will Barton c514d0bc6d Add line about BibTool 1 month ago
.github/workflows Initial commit 3 months ago
extract_bib Initial commit 3 months ago
tests Initial commit 3 months ago
.gitignore Initial commit 3 months ago
LICENSE Initial commit 3 months ago
MANIFEST.in Initial commit 3 months ago
README.md Add line about BibTool 1 month ago
pyproject.toml Initial commit 3 months ago
setup.py Initial commit 3 months ago
tox.ini Initial commit 3 months ago

README.md

extract_bib

Test

A small utility that uses BibTool to extract only the works cited in a Pandoc Markdown file from a BibTeX file.

If your workflow involves writing in Markdown and converting that Markdown to TeX with Pandoc, and you keep a large bibliography in a single BibTeX file, this utility will allow you to extract only the works cited in the Markdown file into a separate BibTeX file for distribution/portability.

It is intended as part of a transparent, plain text academic workflow.

It is based on this ruby Gist.

Installation

Ensure that BibTool is installed.

pip install extract_bib

Usage

To extract the references in great_paper.md that you keep in your ~/Documents/references.bib and place them in great_paper.bib, run:

extract_bib --bibtex-file ~/Documents/references.bib great_paper.md great_paper.bib