From c52dc7ed6951af2d74804d1275e577205960b235 Mon Sep 17 00:00:00 2001 From: lukeflo Date: Thu, 27 Feb 2025 17:45:40 +0100 Subject: add `file_prefix` option to config and opening function --- README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index 6907af4..8a503e8 100644 --- a/README.md +++ b/README.md @@ -145,6 +145,9 @@ editor = "vim" # with args: "vim -y" pdf_opener = "xdg-open" # Default app to open URLs/DOIs url_opener = "xdg-open" +# Prefix which is prepended to the filepath from the `file` field +# Use absolute paths (~ for HOME works). Otherwise, loading might not work. +file_prefix = "/some/path/prefix" ``` If no file or dir is set as `bibfiles` value, you *have to* add a path via CLI @@ -152,6 +155,23 @@ interface. If the `bibfiles` value is set *and* a further path (or multiple) is provided through the CLI call, the entries of all those files will be opened in the started `bibiman` session. +The file prefix offers the possibility to keep file paths in your `.bib` file +short: E.g. a combination of those values in config and bibfile: + +```toml +# bibiman.toml +file_prefix = "~/Documents/literature" +``` + +```bibtex +# bibfile.bib +file = {aristotle.pdf} +``` + +Will result in opening the file `~/Documents/literature/aristotle.pdf` when +trying to open the PDF from inside `bibiman`. The `.bib` file itself will not be +edited! + ### Color Configuration Furthermore, it is now possible to customize the colors. The following values -- cgit v1.2.3