dotfiles/bibtex
Marty Oehme 5ceb05bbce
[bibtex] Add bib-due script filter options
Added options to bib-due script to pass input file (-i filename.bib), to
display simple help (-h), to specify which field to filter by (-l
fieldname), to specify which values to retain (-r
'values|in|regex|groups'), until which date to show (-u 2020-05-13).

Parsing remains brittle, which makes -l and -r not very useful as of
now; the parser would just get confused with different fields being
present.
2020-05-16 17:35:40 +02:00
..
.local/bin [bibtex] Add bib-due script filter options 2020-05-16 17:35:40 +02:00
README.md [bibtex] Add README for module 2020-05-16 17:35:40 +02:00

Bibtex module

bibtex - plain-text reference management

bib-due

The bib-due script depends on (gnu) grep, awk, and sed. It is currently written in a rather haphazard way, and prone to breakage. On the other hand, it does what it's supposed to do: list bibtex entries which have their due-date coming up.

The script needs bibtex entries to be marked with two fields: due, containing a due date (ideally in YYYY-MM-DD format, for easy sorting), and priority containing a read priority. It will also, by default attempt to grab the values of the fields author and title, as well as the name of the bibtex key of the entry.

It can be invoked with the path to a bibtex file bib-due path/to/library.bib, and will gather the entries from the respective file. It can be invoked without an argument if the environment variable $BIBFILE is declared (pointing to a bibtex file).

Example output looks as follows:

bib-due example output

The output can then be filtered further through other programs.

rofi-bib-due

The rofi-bib-due script utilizes the bib-due script and depends on an existing installed rofi module (see here). On invocation, it creates a list of upcoming readings, and allows selecting one of the readings. The selected reading will be passed along to $FILEREADER if it is declared, falling back to xdg-open if not.

Currently, the path to the reading pdf is hard-coded to be path/to/bibtex.bib/pdf, and the name has to begin with the exact bibtex key; otherwise the script will not be able to find the pdf.

An example of the script in action: (window size has been reduced for the recording, cutting off most entry names)

rofi-bib-due demonstration