Marionberry_Unique · 2022-07-10 16:03
voidee123 · 2022-07-11 00:45
`org-ref` has some functions for adding bib entries to a bib file, such as `doi-utils-add-bibtex-entry-from-doi` and `arxiv-add-bibtex-entry`. These are a bit fancier and will even try to download a pdf and save it to your reference directory (named after the bibkey it generates for them). Since `org-ref` is split into different files, you can load these helper functions without having to load `org-ref` citation links now that `org-cite` exists.
Also, with qutebrowser, which has a simple `userscript` feature, it's possible to add keybindings that will hint all urls on a page and send the selected link to the appropriate emacs function. For dois, I use the script:
#!/usr/bin/env bash
# Add a doi to the master bib and try to download the associated pdf.
doi=$(echo $QUTE_URL | sed -n "s_https://doi.org/\(.*\)_\1_p")
bibfile="$HOME/notes/zettle/references/master.bib"
emacsclient --eval "(doi-utils-add-bibtex-entry-from-doi \"$doi\" \"$bibfile\")"
I can then select a link through qutebrowser and have it download everything.