:type 'directory
:group 'conf:configuration)
-(defcustom conf:elfeed-opml-file
- (expand-file-name "~/rss_feed.opml")
- "OPML file with RSS feeds to follow."
+(defcustom conf:elfeed-protocol-certificate
+ ""
+ "Certificate for connecting to a RSS server."
:type 'file
:group 'conf:configuration)
+(defcustom conf:elfeed-protocol-key
+ ""
+ "Key for connecting to a RSS server."
+ :type 'file
+ :group 'conf:configuration)
+
+;; elfeed-protocol does not support native Miniflux API. However, Miniflux
+;; implements Fever API which elfeed-protocol does support [1].
+;;
+;; [1] https://github.com/fasheng/elfeed-protocol/issues/39
+(use-package elfeed-protocol
+ :ensure t
+ ;; Load when `elfeed' is first opened because `elfeed-protocol' will ask for
+ ;; credentials.
+ :defer t
+ :config
+ (setq elfeed-curl-extra-arguments
+ (list "-E"
+ conf:elfeed-protocol-certificate
+ "--key"
+ conf:elfeed-protocol-key))
+ (setq elfeed-protocol-fever-update-unread-only t)
+ (setq elfeed-protocol-fever-fetch-category-as-tag t)
+ (setq elfeed-protocol-feeds
+ (list
+ (list (concat "fever+https://"
+ (password-store-get-field "server/miniflux" "username")
+ "@rss.dobity.eu.org")
+ :api-url "https://rss.dobity.eu.org/fever/"
+ :password (password-store-get "server/miniflux"))))
+ (setq elfeed-protocol-enabled-protocols '(fever)))
+
(use-package elfeed
:requires
(conf-keys)
:bind
("C-c f" . elfeed)
(:map elfeed-search-mode-map
- ("?" . conf:elfeed-transient)
- ([remap elfeed-search-fetch] . conf:elfeed-load-opml-and-fetch))
+ ("?" . conf:elfeed-transient))
:custom
(elfeed-db-directory conf:elfeed-db-directory)
- (elfeed-search-filter "@1-week-ago +unread ![$]")
+ (elfeed-search-filter "@1-week-ago +unread")
:config
(transient-define-prefix conf:elfeed-transient ()
"Transient keymap with usefeul commands for `elfeed'."
("h" "help" describe-mode)
("q" "quit" elfeed-search-quit-window)]])
- (defun conf:elfeed-load-opml-and-fetch ()
- "Insert `conf:elfeed-opml-file' file to `elfeed-feeds' and update feed."
- (interactive)
- (when (file-exists-p conf:elfeed-opml-file)
- (elfeed-load-opml conf:elfeed-opml-file))
- (call-interactively #'elfeed-search-fetch)))
+ (elfeed-protocol-enable))
(provide 'conf-rss)