chenyanming / calibredb.el

Emacs calibre client - An Ebook Management Solution in Emacs.
GNU General Public License v3.0
318 stars 16 forks source link

Add "calibredb-library-manipulated-hook" for users of BibTeX or related formats #73

Open yaqubroli opened 1 year ago

yaqubroli commented 1 year ago

What the title says. Basically, I have a function that automatically exports my Calibre library to a BibTeX file, and I think it'd be a good idea to add a hook to trigger it whenever I add or remove a book from within emacs:

(defun yaqub/calibredb-export-bibtex ()
  (interactive)
  (let ((bibtex-command "calibredb catalog ~/Books/References.bib"))
    (shell-command bibtex-command)))

I think this would be a good idea for users of plugins such as citar, helm- and ivy-bibtex, and org-roam-bibtex. I might make a PR today for this.