2021-03-02 02:17:20 +00:00
|
|
|
;; -*- lexical-binding: t; -*-
|
|
|
|
|
|
|
|
(use-package nov
|
2023-04-27 18:56:06 +00:00
|
|
|
:mode (("\\.epub\\'" . nov-mode)))
|
2021-03-02 02:17:20 +00:00
|
|
|
|
|
|
|
(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)
|