2019-07-12 17:46:34 +02:00
|
|
|
|
;;; oni-elfeed.el --- Elfeed configuration -*- lexical-binding: t; -*-
|
|
|
|
|
|
|
|
|
|
;; Copyright (C) 2019 Tom Willemse
|
|
|
|
|
|
|
|
|
|
;; Author: Tom Willemse <tom@ryuslash.org>
|
|
|
|
|
;; Keywords: local
|
2023-04-02 08:18:07 +02:00
|
|
|
|
;; Version: 2023.0331.141153
|
2021-07-02 03:01:24 +02:00
|
|
|
|
;; Package-Requires: (elfeed olivetti)
|
2019-07-12 17:46:34 +02:00
|
|
|
|
|
|
|
|
|
;; This program is free software; you can redistribute it and/or modify
|
|
|
|
|
;; it under the terms of the GNU General Public License as published by
|
|
|
|
|
;; the Free Software Foundation, either version 3 of the License, or
|
|
|
|
|
;; (at your option) any later version.
|
|
|
|
|
|
|
|
|
|
;; This program is distributed in the hope that it will be useful,
|
|
|
|
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
;; GNU General Public License for more details.
|
|
|
|
|
|
|
|
|
|
;; You should have received a copy of the GNU General Public License
|
|
|
|
|
;; along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
|
|
;;; Commentary:
|
|
|
|
|
|
2021-07-16 07:34:08 +02:00
|
|
|
|
;; Configuration for the elfeed feed reader. Add the following to your init file
|
|
|
|
|
;; in case you want to use this configuration:
|
|
|
|
|
;;
|
|
|
|
|
;; (with-eval-after-load 'elfeed (require 'oni-elfeed))
|
2019-07-12 17:46:34 +02:00
|
|
|
|
|
|
|
|
|
;;; Code:
|
|
|
|
|
|
|
|
|
|
(require 'elfeed)
|
2021-07-02 03:01:24 +02:00
|
|
|
|
(require 'shr)
|
|
|
|
|
|
|
|
|
|
(defun oni-elfeed-enable-olivetti-mode ()
|
|
|
|
|
"Change ‘olivetti-body-width’ to match the ‘shr-max-width’."
|
|
|
|
|
(setq-local olivetti-body-width (1+ shr-max-width))
|
|
|
|
|
(olivetti-mode))
|
2019-07-12 17:46:34 +02:00
|
|
|
|
|
|
|
|
|
(setq elfeed-feeds
|
|
|
|
|
'("http://nullprogram.com/feed/"
|
2019-07-16 17:30:30 +02:00
|
|
|
|
("http://planet.emacsen.org/atom.xml" emacs)
|
2019-07-17 07:44:22 +02:00
|
|
|
|
("http://oremacs.com/atom.xml" emacs)
|
|
|
|
|
("http://emacshorrors.com/feed.atom" emacs)
|
|
|
|
|
("http://emacsredux.com/atom.xml" emacs)
|
|
|
|
|
("http://emacsrocks.com/atom.xml" emacs)
|
|
|
|
|
("http://endlessparentheses.com/atom.xml" emacs)
|
|
|
|
|
("http://www.masteringemacs.org/feed/" emacs)
|
|
|
|
|
("http://pragmaticemacs.com/feed/" emacs)
|
|
|
|
|
("http://sachachua.com/blog/category/emacs/feed/" emacs)
|
|
|
|
|
("http://planet.lisp.org/rss20.xml" lisp)
|
2019-07-17 17:10:08 +02:00
|
|
|
|
"http://aphyr.com/posts.atom"
|
|
|
|
|
"https://news.ycombinator.com/rss"
|
|
|
|
|
("https://lwn.net/headlines/newrss" linux)
|
|
|
|
|
("https://serversforhackers.com/feed.xml" linux)
|
|
|
|
|
"http://julien.danjou.info/blog/index.xml"
|
|
|
|
|
"https://sites.google.com/site/darkwavestyle/SecretPage1/posts.xml"
|
|
|
|
|
("http://lispblog.xach.com/rss" lisp)
|
|
|
|
|
"http://esr.ibiblio.org/?feed=rss2"
|
|
|
|
|
"http://feeds.feedburner.com/GiantRobotsSmashingIntoOtherGiantRobots"
|
|
|
|
|
"http://grumpygamer.com/rss2.0"
|
|
|
|
|
"http://irreal.org/blog/?feed=rss2"
|
|
|
|
|
"http://devblog.avdi.org/feed/"
|
|
|
|
|
"http://wingolog.org/feed/atom"
|
|
|
|
|
"http://xach.livejournal.com/data/atom"
|
|
|
|
|
"http://allanmcrae.com/feed/"
|
|
|
|
|
"http://beej.us/blog/rss.xml"
|
|
|
|
|
"http://steve-yegge.blogspot.be/atom.xml"
|
|
|
|
|
"https://www.archlinux.org/feeds/news/"
|
|
|
|
|
("http://blog.quicklisp.org/feeds/posts/default" lisp)
|
|
|
|
|
"http://www.gimp.org/news.rdf"
|
|
|
|
|
"https://nostarch.com/feeds/comingsoon.xml"
|
2021-05-21 07:50:49 +02:00
|
|
|
|
"https://nostarch.com/feeds/newbooks.xml"
|
|
|
|
|
"https://drewdevault.com/blog/index.xml"
|
2021-06-11 10:18:49 +02:00
|
|
|
|
"https://sourcehut.org/blog/index.xml"
|
2022-05-26 10:30:22 +02:00
|
|
|
|
("https://blog.tecosaur.com/tmio/rss.xml" emacs org-mode)
|
|
|
|
|
"https://www.opensourcestories.org/index.xml"
|
2022-05-27 08:12:47 +02:00
|
|
|
|
"https://neverworkintheory.org/atom.xml"
|
2022-08-17 23:51:17 +02:00
|
|
|
|
"https://ag91.github.io/rss.xml"
|
|
|
|
|
"https://programming-journal.org/feed.xml"
|
2022-09-21 08:25:15 +02:00
|
|
|
|
"https://unzip.dev/rss/"
|
2022-10-20 07:51:21 +02:00
|
|
|
|
("http://lambda-the-ultimate.org/rss.xml" lisp)
|
2022-11-23 08:31:17 +01:00
|
|
|
|
"https://planet.emacslife.com/atom.xml"
|
2023-02-25 08:37:34 +01:00
|
|
|
|
"https://www.reddit.com/r/wallpapers/new.xml"
|
|
|
|
|
"https://picolisp-explored.com/rss.xml"
|
|
|
|
|
"https://onethingwell.org/rss"))
|
2019-07-16 17:30:30 +02:00
|
|
|
|
|
|
|
|
|
(add-hook 'elfeed-new-entry-hook
|
|
|
|
|
(elfeed-make-tagger :before "2 weeks ago"
|
|
|
|
|
:remove 'unread))
|
2019-07-12 17:46:34 +02:00
|
|
|
|
|
2022-09-23 07:29:06 +02:00
|
|
|
|
;;; Mark any post from LWN as read if it starts with “[$]”.
|
|
|
|
|
(add-hook 'elfeed-new-entry-hook
|
|
|
|
|
(elfeed-make-tagger :feed-url (rx "lwn.net")
|
2023-04-02 08:17:47 +02:00
|
|
|
|
:entry-title (rx bos (or "[$]"
|
|
|
|
|
"Security updates for"))
|
2022-09-23 07:29:06 +02:00
|
|
|
|
:remove 'unread))
|
|
|
|
|
|
2022-11-23 08:31:17 +01:00
|
|
|
|
;;; Mark any post not containing my resolutions as read.
|
|
|
|
|
(add-hook 'elfeed-new-entry-hook
|
|
|
|
|
(elfeed-make-tagger :feed-url (rx "reddit.com/r/wallpapers")
|
|
|
|
|
:entry-title `(not ,(rx (or (seq "5120" (minimal-match (zero-or-more whitespace)) nonl (minimal-match (zero-or-more whitespace)) "1440")
|
|
|
|
|
(seq "1920" (minimal-match (zero-or-more whitespace)) nonl (minimal-match (zero-or-more whitespace)) "1080"))))
|
|
|
|
|
:remove 'unread))
|
|
|
|
|
|
2023-04-02 08:18:07 +02:00
|
|
|
|
;;; Mark any post from Planet Emacslife read if I also follow the originating
|
|
|
|
|
;;; blog. This way I won't have so many duplicates.
|
|
|
|
|
(add-hook 'elfeed-new-entry-hook
|
|
|
|
|
(elfeed-make-tagger :feed-url (rx "planet.emacslife.com")
|
|
|
|
|
:entry-title `(not ,(rx bos (or "Irreal"
|
|
|
|
|
"Sacha Chua"
|
|
|
|
|
"Andrea")
|
|
|
|
|
":"))))
|
|
|
|
|
|
2021-07-02 03:01:24 +02:00
|
|
|
|
(add-hook 'elfeed-show-mode-hook #'oni-elfeed-enable-olivetti-mode)
|
|
|
|
|
|
2019-07-12 17:46:34 +02:00
|
|
|
|
(provide 'oni-elfeed)
|
|
|
|
|
;;; oni-elfeed.el ends here
|