commit f6e05ef56092068cb2e841cb1faaaef5815e34e2 parent 7252d14b5063f2fb870191b6d7a154f5e7d4c7ff Author: Sven Möller <sven@svenmoeller.xyz> Date: Sat, 26 Feb 2022 12:52:40 +0100 Update feedsync script Diffstat:
M | bin/.local/bin/feedsync | | | 17 | ++++++++++++++--- |
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/bin/.local/bin/feedsync b/bin/.local/bin/feedsync @@ -1,8 +1,19 @@ #!/bin/sh -feeds=~/.sfeed/feeds/* path=/var/www/news sfeed_update -sfeed_html $feeds > $path/index.html -sfeed_plain $feeds | sort -gr -k1.3 > $path/index.txt +cd ~/.sfeed/feeds/ + +feeds="$(awk -F'\t' ' +BEGIN { OFS = "\t"; } +{ + $2 = "[" FILENAME "] " $2; + print $0 +}' * | sort -gr | head -n100)" + +echo "$feeds" | sfeed_html > $path/index.html +echo "$feeds" | sfeed_plain > $path/index.txt + +sfeed_atom * > $path/feeds.xml +sfeed_html * > $path/feeds/index.html