<span class="mw-page-title-main">Bibpapersfrom</span>
Fabrice P. Lauss𝕪's Web

bibpapersfrom

bibpapersfrom is a python script to process BibTeX database so as to extract keys from a given author, e.g.,

laussy@azag:~/$ bibpapersfrom "A. Einstein"
einstein05a
einstein05b
einstein05c
einstein05d
einstein14a
einstein16a
einstein17a
einstein24a
einstein25a
einstein25b
einstein35a
einstein35b

One can use -s and -l to separate 1st and last authorship, -sl to separate them both. Also -c to enclose keys within curly brackets so as to be usable in my bibTeX2wiki scheme:

laussy@azag:~/$ bibpapersfrom "H. Dehmelt" -sl -c
% first author
{{dehmelt75a}}
{{dehmelt81a}}
{{dehmelt86a}}

% last author
{{neuhauser80a}}
{{nagourney86a}}

Since v1.6 there is also -d (dieresis), which prefixes each key with # instead of *—a numbered wikitext list rather than a bulleted one:

laussy@azag:~/$ bibpapersfrom -1 -d "del Valle"
# {{delvalle07a}}
# {{delvalle07b}}
# {{delvalle07c}}

and still other options:

laussy@azag:~/$ bibpapersfrom -h
usage: bibpapersfrom [-h] [-b BIB] [-1 | -l | -s | -sl] [-c] [-m] [--pdf-field PDF_FIELD] [--color {auto,always,never}] [--count] [-V] [name]

List BibTeX keys for entries featuring a named author.

positional arguments:
  name                  scientist name (default: "Fabrice P. Laussy")

options:
  -h, --help            show this help message and exit
  -b BIB, --bib BIB     bib file(s), comma-separated (default: ~/bib/sci.bib)
  -1, --first-only      only entries where NAME is first author
  -l, --last-only       only entries where NAME is last author
  -s, --separate        separate first-author from not-first entries
  -sl, --separate-fl    separate first, last, and other entries
  -c, --curly           surround each key with {{ }}
  -m, --missing-pdf     restrict to matched entries with no pdf
  --pdf-field PDF_FIELD
                        comma-separated fields signalling a pdf (default: pdf,file)
  --color {auto,always,never}
                        colorise headings (default: auto)
  --count               print a total count to stderr
  -V, --version         show program's version number and exit

Version

Versions