elfeed-nitter

Download Nitter RSS feeds in such a way that for each feed it will choose a random nitter instance.
Log | Files | Refs

commit 2623463a7674812bcbf9609555eadb26f1828d6e
parent a6fc6025a960ee9d98f49e05a0409e20204b0c95
Author: Yuval Langer <yuval.langer@gmail.com>
Date:   Mon,  6 Nov 2023 14:28:11 +0200

Change a few names.  Simplify an update function.  Correct defcustom types.

Diffstat:
Melfeed-nitter.el | 24++++++++++--------------
1 file changed, 10 insertions(+), 14 deletions(-)

diff --git a/elfeed-nitter.el b/elfeed-nitter.el @@ -40,21 +40,22 @@ '(elfeed-nitter) "Tags added by default to the elfeed-nitter entries." :group 'elfeed-nitter - :type (repeat 'symbol)) + :type '(repeat symbol)) (defcustom en-hosts '("nitter.net") "Nitter instance domains used in making the elfeed-nitter entries." :group 'elfeed-nitter - :type (repeat 'string)) + :type '(repeat string)) (defcustom en-paths-and-tags '(("/emacs/rss" without_replies) ("/emacs/with_replies/rss" with_replies)) "Wanted Nitter feeds." :group 'elfeed-nitter - :type (repeat (cons 'string - (repeat 'symbol)))) + :type '(repeat (choice string + (cons string + (repeat symbol))))) (defcustom en-wiki-url "https://github.com/zedeus/nitter.wiki.git" @@ -73,7 +74,7 @@ (concat en-path "nitter-wiki/Instances.md")) -(defun en-make-random-feeds-alist () +(defun en-make-random-feeds-list () (cl-loop with hosts-list = (en-make-instances-hosts-list) @@ -94,14 +95,14 @@ "-" host)) - for rest-of-the-tags = + for entry-tags = (cdr entry) collect (append (list url host-tag) en-default-tags - rest-of-the-tags))) + entry-tags))) (defun en-make-feeds-alist () (cl-loop @@ -132,13 +133,8 @@ rest-of-the-tags)))) (defun en-update-random-instances () - (let (_) - (defvar elfeed-feeds) - (message (pp-to-string elfeed-feeds)) - (let* ((elfeed-feeds (en-make-random-feeds-alist))) - (message (pp-to-string elfeed-feeds)) - (elfeed-update)) - (message (pp-to-string elfeed-feeds)))) + (let ((elfeed-feeds (en-make-random-feeds-list))) + (elfeed-update))) (defun en--clone-nitter-wiki () (ignore-error 'file-already-exists