Add ebook management/reading
This commit is contained in:
parent
5001c485f6
commit
c2e2e9e780
21
emacs/.emacs.d/config/init-epub.el
Normal file
21
emacs/.emacs.d/config/init-epub.el
Normal file
@ -0,0 +1,21 @@
|
||||
;; -*- 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)
|
@ -89,3 +89,4 @@
|
||||
(require 'init-direnv)
|
||||
(require 'init-email)
|
||||
(require 'init-kubernetes)
|
||||
(require 'init-epub)
|
||||
|
Loading…
Reference in New Issue
Block a user