dotfiles/emacs/.emacs.d/config/init-epub.el

23 lines
579 B
EmacsLisp
Raw Normal View History

2021-03-02 02:17:20 +00:00
;; -*- lexical-binding: t; -*-
(use-package nov
2021-10-15 14:40:32 +00:00
:straight (:host github :repo "wasamasa/nov.el")
2021-03-02 02:17:20 +00:00
:mode (("\\.epub\\'" . nov-mode))
:config
(evil-collection-nov-setup))
(defvar ebook-library
(expand-file-name "~/Sync/Calibre Library")
"Ebook library directory")
(defun find-ebook (book)
"Finds an ebook from my library"
(interactive (list
(completing-read
"Book: "
(directory-files-recursively ebook-library
"\\.epub$"))))
(find-file book))
(provide 'init-epub)