diff options
author | Case Duckworth | 2022-07-18 08:56:25 -0500 |
---|---|---|
committer | Case Duckworth | 2022-07-18 08:56:25 -0500 |
commit | 7bdd0562343b99009f5ea80bb12c6c16a77d8e7f (patch) | |
tree | 5381c5387caa771cb931e24407703340e5f3e97a /sfeedrc | |
parent | Add styling for youtube links (diff) | |
download | sfeed-7bdd0562343b99009f5ea80bb12c6c16a77d8e7f.tar.gz sfeed-7bdd0562343b99009f5ea80bb12c6c16a77d8e7f.zip |
Filter titles and things
Diffstat (limited to 'sfeedrc')
-rw-r--r-- | sfeedrc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sfeedrc b/sfeedrc index b8a6577..136eaf9 100644 --- a/sfeedrc +++ b/sfeedrc | |||
@@ -154,6 +154,13 @@ filter() { | |||
154 | *NPR*) | 154 | *NPR*) |
155 | sed 's@www\.npr\.org@text.npr.org@' | 155 | sed 's@www\.npr\.org@text.npr.org@' |
156 | ;; | 156 | ;; |
157 | r_* | r/*) # reddit (not sure when / => _) | ||
158 | sed -e 's@old\.reddit\.com@teddit.net@' \ | ||
159 | -e 's@reddit\.com@teddit.net@' | ||
160 | ;; | ||
161 | 'Saturday Morning Breakfast Cereal') | ||
162 | sed 's@Saturday Morning Breakfast Cereal - @@' | ||
163 | ;; | ||
157 | *) cat ;; | 164 | *) cat ;; |
158 | esac | | 165 | esac | |
159 | filter_add_empties | | 166 | filter_add_empties | |
@@ -205,9 +212,11 @@ filter_filter_links() { | |||
205 | 212 | ||
206 | filter_html_entities() { | 213 | filter_html_entities() { |
207 | # convert HTML entities into dumb counterparts | 214 | # convert HTML entities into dumb counterparts |
215 | # (and weird shit to normal shit, too) | ||
208 | awk '{ | 216 | awk '{ |
209 | gsub(/"/,"\""); gsub(/"/,"\""); | 217 | gsub(/"/,"\""); gsub(/"/,"\""); |
210 | gsub(/'/,"'\''"); gsub(/'/,"'\''"); | 218 | gsub(/'/,"'\''"); gsub(/'/,"'\''"); |
219 | gsub(/’/,"'\''"); | ||
211 | gsub(/&/,"\\&"); # MUST BE LAST!; | 220 | gsub(/&/,"\\&"); # MUST BE LAST!; |
212 | 221 | ||
213 | }' | 222 | }' |