dotfiles/bibtex/README.md

30 lines
1.8 KiB
Markdown
Raw Normal View History

2020-05-11 16:06:57 +00:00
# Bibtex module
[bibtex](https://en.wikipedia.org/wiki/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](.assets/bibtex/list.png)
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](rofi/)).
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](.assets/bibtex/rofi.gif)