-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
importing bib from doi and cross-ref, including pdf #758
Comments
I'm generally of the view that org-ref is like five packages in one. That's a perfect example of a piece of functionality that should be an independent package. While it could be easily installed as the single file with straight or elpaca, it has no independent melpa recipe. Beyond that, a couple of things: First, I'm a little unclear on the UI, and how much really needs to be tied to org-ref or to citar. Can you clarify that, maybe with a screenshot or two to demonstrate? Also, see: https://github.com/emacs-citar/citar/wiki/Embark#embark-become See the search string that yields no results there? If I choose an option, it pipes that string to the relevant function, and it opens. How does that biblio-based solution compare? Finally, see this new package (and his comparison list): https://github.com/rougier/persid I haven't tried it, but seemed promising. Notably, it offers no query capability. |
@trembel just bumping this, as I realize this issue is waiting on your input ;-) |
The biblio package has functionality to extract BibTeX entries from databases. I wrote a function for EWS that integrates it with Citar. This is a more generalised version: (defun ews--bibtex-combined-biblio-lookup ()
"Combines `biblio-lookup' and `biblio-doi-insert-bibtex'."
(require 'biblio)
(let* ((dbs (biblio--named-backends))
(db-list (append dbs '(("DOI" . biblio-doi-backend))))
(db-selected (biblio-completing-read-alist
"Backend:"
db-list)))
(if (eq db-selected 'biblio-doi-backend)
(let ((doi (read-string "DOI: ")))
(biblio-doi-insert-bibtex doi))
(biblio-lookup db-selected))))
(defun ews-bibtex-biblio-lookup ()
"Insert Biblio search results into curent buffer or select BibTeX file."
(interactive)
(if-let ((current-mode major-mode)
citar-bibliography
(bibfiles (length citar-bibliography))
(bibfile (cond ((eq bibfiles 1) (car ews-bibtex-files))
((equal major-mode 'bibtex-mode)
(buffer-file-name))
(t (completing-read
"Select BibTeX file:" citar-bibliography)))))
(progn (find-file bibfile)
(goto-char (point-max))
(ews--bibtex-combined-biblio-lookup)
(save-buffer))
(message "No BibTeX file(s) defined."))) |
As I'm using emacs for my bibliography management, so far I have to rely on org-ref for some features. org-ref has a very nice import functionality for bib entries (https://github.com/jkitchin/org-ref/blob/master/doi-utils.el). Using
doi-utils-add-entry-from-crossref-query
anddoi-utils-add-bibtex-entry-from-doi
one can easily search for papers on a lot of platforms. It automatically fills the bib informations into a configured bibtex file, and does download the pdf if possible.I think porting this to citar wouldn't be a too big thing, as especially
doi-utils.el
is pretty standalone. If I find time, I will dig into this.The text was updated successfully, but these errors were encountered: