From 4746cd209d0c8d030c1c694b1999f9e4c3e99028 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Mon, 18 Jul 2022 14:05:41 -0500 Subject: Filter Hacker News --- sfeedrc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sfeedrc b/sfeedrc index 58fd6fb..dc06e32 100644 --- a/sfeedrc +++ b/sfeedrc @@ -152,6 +152,16 @@ feeds_misc() { filter() { case "$1" in # Filter items based on feed name. + *'Hacker News'*) + # Hacker news is stupid and doesn't include IDs, and + # instead includes a comments tag in its body. + awk 'BEGIN {FS="\t"; OFS="\t"} { + $6 = $4 + sub(/^.*$/,"", $6) + print + }' + ;; *NPR*) sed 's@www\.npr\.org@text.npr.org@' ;; -- cgit 1.4.1-21-gabe81