diff options
author | Case Duckworth | 2022-07-18 14:05:41 -0500 |
---|---|---|
committer | Case Duckworth | 2022-07-18 14:05:41 -0500 |
commit | 4746cd209d0c8d030c1c694b1999f9e4c3e99028 (patch) | |
tree | 24ae13c725daa915bc40294c87bb886417a73e71 /sfeedrc | |
parent | Change LIMIT to mean max number of items from each feed (diff) | |
download | sfeed-4746cd209d0c8d030c1c694b1999f9e4c3e99028.tar.gz sfeed-4746cd209d0c8d030c1c694b1999f9e4c3e99028.zip |
Filter Hacker News
Diffstat (limited to 'sfeedrc')
-rw-r--r-- | sfeedrc | 10 |
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() { | |||
152 | filter() { | 152 | filter() { |
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 | |||
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 | ;; |