From 70b9039c94ba9b7d6e803cfc4fe406ef55c77ca8 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Thu, 6 May 2021 09:55:54 -0500 Subject: Change subscription method to use a file To set up elsewhere: 1. Delete .emacs.d/var/gnus 2. Start gnus 3. Run gnus/import-feed-list 4. Profit??? I had to also delete all the emails in Emacs-Cloud on IMAP too, so it wasn't what I'd call perfect. But ... it's good enough, for now. I really wish Gnus was more programmable, tbh. --- gnus.el | 62 ++++++++++++++----------------------------------- groups.txt | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 95 insertions(+), 45 deletions(-) create mode 100644 groups.txt diff --git a/gnus.el b/gnus.el index 2ea42ed..3701c70 100644 --- a/gnus.el +++ b/gnus.el @@ -140,48 +140,20 @@ bbdb-offer-save 1 bbdb-update-records-p t)) -;;; Gnus subscriptions -(setq gnus-options-subscribe (rx (or ;; all alternatives go under this - (seq string-start - "nnimap+fastmail.com:" - (or ;; folders in Fastmail - "INBOX"))) - (seq string-start - "nntp+news.tilde.club:" - (or ;; news groups in tilde.club - (seq "local." - (or "general")) - (seq "tilde." - (or "art" - "club" - "cosmic" - "food+drink" - "gopher" - "meta" - "poetry" - "services")))))) - -(setq gnus-options-not-subscribe (rx (or ;; all alternatives go under this - (seq string-start - "nnimap+fastmail.com:" - (or ;; folders in Fastmail - "Archive" - "Bulk" - "DeltaChat" - "Gmail" - "Pam" - "Spam" - "Trash" - "blag" - "notes")) - (seq string-start - "nntp+news.tilde.club:" - (or ;; news groups in tilde.club - (seq "tilde." - (or "black" - "javascript" - "nsfw" - "php" - "pink" - "python" - "your"))))))) +;;; Functions +;; see https://wpc.io/blog/posts/bulk-import-rss-feeds-to-gnus-via-gwene.html +(defun gnus/slurp (file) + "Read FILE into a string." + (with-temp-buffer + (insert-file-contents file) + (buffer-substring-no-properties + (point-min) + (point-max)))) + +(defun gnus/import-feed-list (path) + "Import list of NNTP feeds from file at PATH." + (interactive "F") + (let ((feeds (split-string (gnus/slurp path) "\n" t))) + (cl-loop for feed in feeds + do (with-message (format "Subscribing to %s" feed) + (gnus-subscribe-group feed))))) diff --git a/groups.txt b/groups.txt new file mode 100644 index 0000000..5cee798 --- /dev/null +++ b/groups.txt @@ -0,0 +1,78 @@ +nnimap+fastmail.com:INBOX +nntp+news.gwene.org:gwene.blog.botanistinthek +nntp+news.gwene.org:gwene.ca.muto +nntp+news.gwene.org:gwene.casa.m455 +nntp+news.gwene.org:gwene.casa.m455.weed.weed +nntp+news.gwene.org:gwene.codes.esoteric +nntp+news.gwene.org:gwene.com.aiweirdness +nntp+news.gwene.org:gwene.com.ajroach42 +nntp+news.gwene.org:gwene.com.careercenterbr +nntp+news.gwene.org:gwene.com.catandgirl +nntp+news.gwene.org:gwene.com.deprogrammatic +nntp+news.gwene.org:gwene.com.drewdevault.blog +nntp+news.gwene.org:gwene.com.ebrpl.blog +nntp+news.gwene.org:gwene.com.emacslife.planet +nntp+news.gwene.org:gwene.com.falseknees +nntp+news.gwene.org:gwene.com.gerwitz.hans.feeds.writing +nntp+news.gwene.org:gwene.com.greghendershot +nntp+news.gwene.org:gwene.com.invisibleup +nntp+news.gwene.org:gwene.com.lambdacreate.static +nntp+news.gwene.org:gwene.com.murilopereira +nntp+news.gwene.org:gwene.com.occasionallyco +nntp+news.gwene.org:gwene.com.rachelbythebay.w +nntp+news.gwene.org:gwene.com.realbakingwith.month +nntp+news.gwene.org:gwene.com.usesthis +nntp+news.gwene.org:gwene.com.wflewis +nntp+news.gwene.org:gwene.com.whyarentyoucod +nntp+news.gwene.org:gwene.com.xkcd +nntp+news.gwene.org:gwene.dance.hamster.blog +nntp+news.gwene.org:gwene.de.uninformativ.blog.feeds.en +nntp+news.gwene.org:gwene.info.benjaminwil.antisocial +nntp+news.gwene.org:gwene.institute.tilde.xfnw.sandcats +nntp+news.gwene.org:gwene.io.github.chrisman +nntp+news.gwene.org:gwene.io.github.wphicks +nntp+news.gwene.org:gwene.io.jao.blog +nntp+news.gwene.org:gwene.io.wpc.blog +nntp+news.gwene.org:gwene.li.eli +nntp+news.gwene.org:gwene.link.atthis +nntp+news.gwene.org:gwene.me.tedder.dyn.rss.farside.daily +nntp+news.gwene.org:gwene.name.spwhitton.blog +nntp+news.gwene.org:gwene.net.acdw +nntp+news.gwene.org:gwene.net.acdw.feed.weed +nntp+news.gwene.org:gwene.net.envs.lucidiot.rsrsss +nntp+news.gwene.org:gwene.net.neeasade.notes.rss.full +nntp+news.gwene.org:gwene.net.ryliejamesthom.blog +nntp+news.gwene.org:gwene.news.tilde.rss.token.fvd.fj8r.qkhr.by9j1y.on1t6rykddc +nntp+news.gwene.org:gwene.nz.geek.sanctum.blog +nntp+news.gwene.org:gwene.org.eu.pt.astrosnail.blog +nntp+news.gwene.org:gwene.org.lisp.planet.rss20 +nntp+news.gwene.org:gwene.org.neocities.society +nntp+news.gwene.org:gwene.org.neocities.supervegan +nntp+news.gwene.org:gwene.org.scheme.planet +nntp+news.gwene.org:gwene.org.z3bra.blog +nntp+news.gwene.org:gwene.rip.computer +nntp+news.gwene.org:gwene.space.covering.puzzles +nntp+news.gwene.org:gwene.space.makeworld +nntp+news.gwene.org:gwene.space.petras +nntp+news.gwene.org:gwene.team.tilde.dozens.dreams +nntp+news.gwene.org:gwene.town.tilde.dozens.rsspect +nntp+news.gwene.org:gwene.town.tilde.lucidiot.fridaypostcard +nntp+news.gwene.org:gwene.town.tilde.lucidiot.weed.weed +nntp+news.gwene.org:gwene.town.tilde.m455.javapool +nntp+news.gwene.org:gwene.town.tilde.mroik.blog +nntp+news.gwene.org:gwene.town.tilde.trm.blog +nntp+news.gwene.org:gwene.uk.co.gaffen +nntp+news.gwene.org:gwene.uk.me.insom +nntp+news.gwene.org:gwene.voyage.cosmic +nntp+news.gwene.org:gwene.website.coolguy.weed.weed +nntp+news.gwene.org:gwene.xyz.earnestma.blog +nntp+news.gwene.org:gwene.xyz.jackreid +nntp+news.tilde.club:local.general +nntp+news.tilde.club:tilde.art +nntp+news.tilde.club:tilde.club +nntp+news.tilde.club:tilde.cosmic +nntp+news.tilde.club:tilde.food+drink +nntp+news.tilde.club:tilde.gopher +nntp+news.tilde.club:tilde.meta +nntp+news.tilde.club:tilde.poetry +nntp+news.tilde.club:tilde.services -- cgit 1.4.1-21-gabe81