about summary refs log tree commit diff stats
path: root/sfeedrc
diff options
context:
space:
mode:
authorCase Duckworth2022-07-18 14:05:41 -0500
committerCase Duckworth2022-07-18 14:05:41 -0500
commit4746cd209d0c8d030c1c694b1999f9e4c3e99028 (patch)
tree24ae13c725daa915bc40294c87bb886417a73e71 /sfeedrc
parentChange LIMIT to mean max number of items from each feed (diff)
downloadsfeed-4746cd209d0c8d030c1c694b1999f9e4c3e99028.tar.gz
sfeed-4746cd209d0c8d030c1c694b1999f9e4c3e99028.zip
Filter Hacker News
Diffstat (limited to 'sfeedrc')
-rw-r--r--sfeedrc10
1 files changed, 10 insertions, 0 deletions
diff --git a/sfeedrc b/sfeedrc index 58fd6fb..dc06e32 100644 --- a/sfeedrc +++ b/sfeedrc
@@ -152,6 +152,16 @@ feeds_misc() {
152filter() { 152filter() {
153 case "$1" in 153 case "$1" in
154 # Filter items based on feed name. 154 # Filter items based on feed name.
155 *'Hacker News'*)
156 # Hacker news is stupid and doesn't include IDs, and
157 # instead includes a comments tag in its body.
158 awk 'BEGIN {FS="\t"; OFS="\t"} {
159 $6 = $4
160 sub(/^<a href="/,"", $6)
161 sub(/>.*$/,"", $6)
162 print
163 }'
164 ;;
155 *NPR*) 165 *NPR*)
156 sed 's@www\.npr\.org@text.npr.org@' 166 sed 's@www\.npr\.org@text.npr.org@'
157 ;; 167 ;;