dotfiles/bibtex/.local/bin/bib_due

8 lines
320 B
Plaintext
Raw Normal View History

#!/usr/bin/env sh
# shows due entries of bibtex file passed in
# HACK: brittle and hacky!
#
# looks for 'due' entries in bibfile and gets their
awk '/due|^@\w|prio[123]/' ORS=' ' "$1" | sed -E 's/ (@\w)/\n\1/g' | grep due | sed 's/ //g' | sed -E 's/^@\w+\{(\w+),due=\{(.+?)\},.*,priority=\{(\w)+\}.*$/\2 \3 \1/' | sort