From 8ddb2121cf145c001864091ab8776d2e416a8034 Mon Sep 17 00:00:00 2001 From: Felix Van der Jeugt Date: Sat, 24 Sep 2022 10:52:46 +0200 Subject: [PATCH] add minute food, no more t21-cakes and no renamed posts pls --- services/sfeed/run | 10 +++++++--- sfeed/sfeedrc | 3 ++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/services/sfeed/run b/services/sfeed/run index 00cf5df..7a46400 100755 --- a/services/sfeed/run +++ b/services/sfeed/run @@ -15,11 +15,15 @@ pgrep gpg-agent > /dev/null d="$(mktemp -d)" trap "rm -rf '$d'" EXIT KILL mmkdir "$d" -sfeed_update > /dev/null 2>&1 +sfeed_update > /dev/null 2>&1 || true sfeed_mbox ~/.sfeed/feeds/* | mdeliver -M -v "$d" | while read mail; do - if ! mlist /data/mail/feeds | magrep -q message-id:"$(mshow -qh message-id "$mail" | cut -d' ' -f2)"; then - mdeliver /data/mail/feeds < "$mail" > /dev/null + if mlist /data/mail/feeds | magrep -q message-id:"$(mshow -qh message-id "$mail" | cut -d' ' -f2)"; then + continue fi + if rg -qF "$(mshow -O "$mail" 1)" /data/mail/feeds; then + continue + fi + mdeliver /data/mail/feeds < "$mail" > /dev/null done rm -rf "$d" diff --git a/sfeed/sfeedrc b/sfeed/sfeedrc index 1031ed2..ca12514 100644 --- a/sfeed/sfeedrc +++ b/sfeed/sfeedrc @@ -12,6 +12,7 @@ feeds() { 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 "Minute Food" "https://www.youtube.com/feeds/videos.xml?channel_id=UCA0g3liRXdpqyhxiQiE55tA" 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 "Jolla Blog" "https://blog.jolla.com/feed/" @@ -26,5 +27,5 @@ feeds() { feed "FOSDEM" "https://fosdem.org/2021/rss.xml" feed "BE-Alert" "https://www.be-alert.be/nl/rss.xml" feed "Martanne" "https://www.brain-dump.org/blog/index.xml" - feed "Instagram T21" "https://bibliogram.snopyta.org/u/tvervack/rss.xml" + # feed "Instagram T21" "https://bibliogram.snopyta.org/u/tvervack/rss.xml" }