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

22 lines
528 B
EmacsLisp
Raw Normal View History

2021-03-02 02:17:20 +00:00
;; -*- lexical-binding: t; -*-
(use-package nov
: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)