diff --git a/.assets/bibtex/list.png b/.assets/bibtex/list.png new file mode 100644 index 0000000..8507eda Binary files /dev/null and b/.assets/bibtex/list.png differ diff --git a/.assets/bibtex/rofi.gif b/.assets/bibtex/rofi.gif new file mode 100644 index 0000000..ade60b3 Binary files /dev/null and b/.assets/bibtex/rofi.gif differ diff --git a/bibtex/README.md b/bibtex/README.md new file mode 100644 index 0000000..6c8a733 --- /dev/null +++ b/bibtex/README.md @@ -0,0 +1,29 @@ +# 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)