- Identifies the YAML section at the start of all markdown files in a directory (recursive)
- Creates a new bibtex/biblatex file with the parsed references
The motivation behind this tool is so that the user can build their own personal notes on each article/text they read on a minimally formatted document such as markdown. Then, they can quickly generate a .bib file from all the articles they have read. The resulting .bib file can then be used as needed e.g. to insert citations in a LaTeX-based dissertation/document.
Below is an imaginary example. The tool recognizes the following fields and turns them to .bib format:
---
title: Testing
author: Test McTest and Test O'Test
journal: Test Journal
year: 1901
volume: 1
number: 1
pages: 500-550
---- title: The title of the work
- author: the authors, using their full name
First [Middle] Last, with each author separated byand - journal: The journal where it was published the work
- year: The year of publication
- volume: the volume number of the journal where it was published. Usually the
31in the AMA-formatted citation:... 2022;31(4):324-328 - number: the issue of the journal where it was published. Usually the
4in the AMA-formatted citation:... 2022;31(4):324-328. The reason for this is that in the .bib formatissuehas a different meaning - pages: the page number in the format
int, orint-int. If the journal reports the article number instead of pages, this number comes here. For journals with page number, it's usually the324-328in the AMA formatted citation:... 2022;31(4):324-328For journals with article number, it's Usually the123in the AMA formatted citation:... 2022;31(4):123
Note: Outside of building this repo yourself, currently I only supply a binary for Ubuntu 20 LTS.
To use this tool, simply:
- download the latest release binary in the release page
- run the binary
$ ./yaml-front-matter-to-bib [OPTIONS] --input-directory <INPUT_DIRECTORY>