From 16ae55df9ff6e3cfad40638b6440f42cb3b8f5af Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Tue, 26 Jul 2022 11:28:52 -0500 Subject: Treat tildes.net special in merging --- sfeedrc | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'sfeedrc') diff --git a/sfeedrc b/sfeedrc index 93ccb02..a18f355 100644 --- a/sfeedrc +++ b/sfeedrc @@ -307,7 +307,20 @@ fetch() { # fetch(name, url, feedfile) merge() { # merge(name, oldfile, newfile) - sort -t ' ' -u -k6,6 -k3,3 "$2" "$3" 2>/dev/null + case "$1" in + *'Tildes'*) + # Tildes changes its IDs and titles fairly regularly, which is really + # annoying and adds false doubles. So here, remove the last + # element of the path name (the title), and sort ONLY on TIMESTAMP. + cat "$2" "$3" | + sort -t ' ' -k1,1 -u + ;; + *) + # Otherwise, sort on ID and URL. This minimizes the risk of + # false doubles. + sort -t ' ' -u -k6,6 -k3,3 "$2" "$3" 2>/dev/null + ;; + esac } # Local Variables: -- cgit 1.4.1-21-gabe81