From 0705be2ffa8dbb363967952674f111e9d5242a98 Mon Sep 17 00:00:00 2001 From: Felix Van der Jeugt Date: Mon, 3 Jun 2019 10:29:32 +0200 Subject: [PATCH] replace newsboat with sfeed + fdm --- config/alot/config | 8 ++++++-- config/newsboat/.gitignore | 1 - config/newsboat/config | 14 -------------- local/bin/alot | 6 +++--- notmuch-hooks/pre-new | 4 ++++ sfeed/.gitignore | 3 +++ sfeed/fdm.conf | 25 +++++++++++++++++++++++++ sfeed/sfeedrc | 22 ++++++++++++++++++++++ 8 files changed, 63 insertions(+), 20 deletions(-) delete mode 100644 config/newsboat/.gitignore delete mode 100644 config/newsboat/config create mode 100644 sfeed/.gitignore create mode 100644 sfeed/fdm.conf create mode 100644 sfeed/sfeedrc diff --git a/config/alot/config b/config/alot/config index cc02502..627511f 100644 --- a/config/alot/config +++ b/config/alot/config @@ -1,10 +1,13 @@ initial_command = search query:inbox periodic_hook_frequency = 60 - +edit_headers_blacklist = Content-Type, MIME-Version attachment_prefix = /data/temporary prefer_plaintext = True -editor_cmd = "dvtm 'vis %s'" + +editor_spawn = True +editor_in_thread = True +terminal_cmd = 'st -e' theme = "mutt" @@ -90,6 +93,7 @@ theme = "mutt" A = untag archived ; unfold n = nextpart p = prevpart + u = pipeto --background selecturl [tags] diff --git a/config/newsboat/.gitignore b/config/newsboat/.gitignore deleted file mode 100644 index f5bdad6..0000000 --- a/config/newsboat/.gitignore +++ /dev/null @@ -1 +0,0 @@ -urls diff --git a/config/newsboat/config b/config/newsboat/config deleted file mode 100644 index f7a7e13..0000000 --- a/config/newsboat/config +++ /dev/null @@ -1,14 +0,0 @@ - -browser xdg-open -keep-articles-days 30 -mark-as-read-on-hover yes - -notify-program /usr/bin/notify-send -notify-format "%n new articles on %f feeds" - -refresh-on-startup yes -auto-reload yes -reload-time 60 - -cache-file .cache/newsbeuter.db - diff --git a/local/bin/alot b/local/bin/alot index 83b621a..71004de 100755 --- a/local/bin/alot +++ b/local/bin/alot @@ -1,6 +1,6 @@ #!/usr/bin/python3 -# EASY-INSTALL-ENTRY-SCRIPT: 'alot==0.8','console_scripts','alot' -__requires__ = 'alot==0.8' +# EASY-INSTALL-ENTRY-SCRIPT: 'alot==0.8.1','console_scripts','alot' +__requires__ = 'alot==0.8.1' import re import sys from pkg_resources import load_entry_point @@ -8,5 +8,5 @@ from pkg_resources import load_entry_point if __name__ == '__main__': sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) sys.exit( - load_entry_point('alot==0.8', 'console_scripts', 'alot')() + load_entry_point('alot==0.8.1', 'console_scripts', 'alot')() ) diff --git a/notmuch-hooks/pre-new b/notmuch-hooks/pre-new index a7549d2..c18b102 100755 --- a/notmuch-hooks/pre-new +++ b/notmuch-hooks/pre-new @@ -1,2 +1,6 @@ #!/bin/sh mbsync -qq -a + +sfeed_update 2>&1 | grep '^FAIL' +sfeed_mbox /home/noctua/.sfeed/feeds/* > /home/noctua/.sfeed/feeds.mbox +fdm -q -f /home/noctua/.sfeed/fdm.conf fetch diff --git a/sfeed/.gitignore b/sfeed/.gitignore new file mode 100644 index 0000000..52443d7 --- /dev/null +++ b/sfeed/.gitignore @@ -0,0 +1,3 @@ +feeds.mbox +feeds.mbox.cache +feeds/ diff --git a/sfeed/fdm.conf b/sfeed/fdm.conf new file mode 100644 index 0000000..234646a --- /dev/null +++ b/sfeed/fdm.conf @@ -0,0 +1,25 @@ +set unmatched-mail keep + +account "sfeed" mbox "%[home]/.sfeed/feeds.mbox" + $cachepath = "%[home]/.sfeed/feeds.mbox.cache" + cache "${cachepath}" + $feedsdir = "/data/mail/feeds/" + + # check if in cache by message-id. + match case "^Message-ID: (.*)" in headers + action { + tag "msgid" value "%1" + } + continue + # if in cache, stop. + match matched and in-cache "${cachepath}" key "%[msgid]" + action { + keep + } + + # not in cache, process it and add to cache. + match all action { + maildir "${feedsdir}" + add-to-cache "${cachepath}" key "%[msgid]" + keep + } diff --git a/sfeed/sfeedrc b/sfeed/sfeedrc new file mode 100644 index 0000000..7e63105 --- /dev/null +++ b/sfeed/sfeedrc @@ -0,0 +1,22 @@ +feeds() { + # feed [basesiteurl] [encoding] + # get youtube Atom feed: curl -s -L 'https://www.youtube.com/user/gocoding/videos' | sfeed_web | cut -f 1 + + feed "Giant in the Playground" "http://www.giantitp.com/comics/oots.rss" + feed "XKCD" "https://xkcd.com/atom.xml" "https://xkcd.com" + feed "Ulyssis" "https://ulyssis.org/feed/" + feed "Schneier on Security" "https://www.schneier.com/blog/atom.xml" + feed "PHD Comics" "https://phdcomics.com/gradfeed.php" "https://www.phdcomics.com" + feed "Void news" "https://voidlinux.org/atom.xml" "https://voidlinux.org" + feed "Uniprot" "https://www.uniprot.org/news/?format=rss" + feed "qutebrowser" "http://blog.qutebrowser.org/feeds/all.rss.xml" + feed "This week in Rust" "https://this-week-in-rust.org/rss.xml" + feed "Saturday Morning Breakfast Cereal" "https://www.smbc-comics.com/comic/rss" + feed "Minute Physics" "https://www.youtube.com/feeds/videos.xml?channel_id=UCUHW94eEFW7hkUMVaZz4eDg" + feed "Primitive Technology" "https://www.youtube.com/feeds/videos.xml?channel_id=UCAL3JXZSzSm8AlZyD3nQdBA" + feed "Nicolaas" "http://feeds.soundcloud.com/users/soundcloud:users:454191234/sounds.rss" + feed "Kiwilox" "https://web.stagram.com/rss/n/kiwilox" + feed "Jolla Blog" "https://blog.jolla.com/feed/" + feed "CCC" "https://events.ccc.de/feed/" + feed "Patrick Rothfuss" "https://blog.patrickrothfuss.com/feed/" +}