If you're anything like me, then you probably use a citation manager such as Mendeley or Zotero, and use the browser plugin to conveniently add citations to your library. Everything is rainbows and unicorns until it's time for dissemination 😱. Enter pmcbib
, a friendly utility written in python that checks your .bib file against the PubMed database to find all the fudge-ups.
version 0.0.2.dev1 added support for aliasing and makes use of stdout/stderr (see example use case)
- python 3.7
- metapub
- bibtexparser
- python-Levenshtein
- internet connection (duh!)
pip install git+https://github.com/LelouchLamperougeVI/pmcbib.git
pmcbib [-h] [-c config.json] [-o] [-r report.md] [-v] [-w L] file.bib
positional arguments:
file.bib ye olde bibtex file
optional arguments:
-h, --help show this help message and exit
-c config.json, --config config.json
config file
-o, --output output automatically corrected bibtex entries on
STDOUT
-r report.md, --report report.md
report outputted as a MarkDown file (default no
output)
-v, --verbose turn on verbose (overwrites -w)
-w L, --warn L minimum warning level to report on console (STDERR)
pmcbib -r report.md example.bib
to suppress warning messages:
pmcbib -r report.md -w 4 example.bib
or
pmcbib -r report.md example.bib 2> /dev/null
pmcbib -o example.bib > corrected.bib
pmcbib
will automatically try to fix identified issues. However, it is strongly recommended for the user to go over the report before committing to the output.
pmcbib -c ~/.config/pmcbib/config.json example.bib