tmalsburg / helm-bibtex

Search and manage bibliographies in Emacs
GNU General Public License v2.0
464 stars 74 forks source link

Feature request: Integration with Zotra #437

Closed mpedramfar closed 1 year ago

mpedramfar commented 1 year ago

I've written a package, Zotra, that adds the missing functionality of Zotero to Emacs by allowing the user to get bibliography entries and attachments from a url or a search identifier (DOI, ISBN, PMID, arXiv ID).

In the README file, I've described one possible way to seamlessly integrate bibtex-completion with it so that if zotra is installed, it will offer the option to use it when calling bibtex-completion-add-pdf-to-library and if it's not installed, it will behave as before. (Note that the last 4 lines in the function I've written there is for a separate extra functionality, i.e. to add the path to the newly added file to the bibtex-completion-pdf-field field in the bibtex entry)

tmalsburg commented 1 year ago

Thank you for making me aware of your package. Looks really useful. I've been using biblio.el to fetch BibTeX from Crossref, but the workflow is not as smooth as it could be. Will try your package when I find time.

Suggestion: You may also want to add an entry to the "Fallback options". So that new BibTeX entries can be created using Zotra but through the helm-bibtex UI (analogous to biblio.el integration).

mpedramfar commented 1 year ago

Thanks! As for the "Fallback options", the main zotra-add-entry functions could be used directly:

(add-to-list 'bibtex-completion-fallback-options
             '("Add entry from DOI, ISBN, PMID or arXiv ID (zotra.el)"
               . zotra-add-entry-from-search))

(add-to-list 'bibtex-completion-fallback-options
             '("Add entry from web url                     (zotra.el)"
               . zotra-add-entry-from-url))
ghost commented 1 year ago

There are tons of packages doing the same? Why a new package instead of contributing to one of the existing ones?

mpedramfar commented 1 year ago

With zotra, you can get the bibliographic entry for repos/journals/news articles/youtube videos/etc given their url. And if there are attachments, you can download them too. There are about 600 Zotero translators, each one managing a website. As far as I know, there are no packages doing this.

mpedramfar commented 1 year ago

I simplified the integration to just calling a single function and added it to the code. Not sure if this is the cleanest way, but it does the job. I'll close this issue since the integration is done. Feel free to raise an issue if you use it and see any problems.