Introduction
Introduction Statistics Contact Development Disclaimer Help
Add sfeedmenu. - sfeed-tools - Sfeed helper scripts.
git clone git://bitreich.org/sfeed-tools git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfr…
Log
Files
Refs
Tags
README
---
commit 6625b04305bf19f598bcc15362e5010d98f2f8e6
parent 85bba54e2b691991a27c13abb8e8df2788deea49
Author: eidolon <?>
Date: Mon, 4 Nov 2024 18:16:30 -0500
Add sfeedmenu.
Signed-off-by: Christoph Lohmann <[email protected]>
Diffstat:
A sfeedmenu | 39 +++++++++++++++++++++++++++++…
1 file changed, 39 insertions(+), 0 deletions(-)
---
diff --git a/sfeedmenu b/sfeedmenu
@@ -0,0 +1,39 @@
+#!/bin/sh
+# sfeedmenu with filter
+# by: eidolon
+
+filter() {
+ # filter read items and deduplicate items by url
+ LC_ALL=C awk -v urlfile="$urlfile" '
+ BEGIN { while (getline < urlfile > 0) r[$0] = 1 }
+ {
+ match($0, /[a-z]+:\/\//)
+ url = substr($0, RSTART)
+ if (!dedup[url]++ && !r[url])
+ print
+ }'
+}
+
+plumber=plumb
+feeddir="$HOME/.sfeed/feeds"
+urlfile="$HOME/.sfeed/urls"
+
+mkdir -p "$feeddir"
+
+[ -f "$urlfile" ] || : > "$urlfile"
+
+while IFS= read -r i; do
+ [ -n "$i" ] || exit 1
+
+ i=$(printf '%s\n' "$i" \
+ | sed -n 's,.* \([A-Za-z]*://\)\(.*\)$,\1\2,p')
+
+ printf '%s\n' "$i" >> "$urlfile"
+ "$plumber" "$i"
+done << _EOF
+$(sfeed_plain "$feeddir"/* \
+ | sed -n '/^N / s///p' \
+ | sort -rn \
+ | filter \
+ | dmenu -b -l 12)
+_EOF
You are viewing proxied material from bitreich.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.