about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--sfeedrc6
1 files changed, 3 insertions, 3 deletions
diff --git a/sfeedrc b/sfeedrc index 313876e..b09c20b 100644 --- a/sfeedrc +++ b/sfeedrc
@@ -290,9 +290,9 @@ print
290 # Reddit doesn't include a link as its item IDs, but instead 290 # Reddit doesn't include a link as its item IDs, but instead
291 # something of the form `t3_xxxxx', where xxxxx can be glommed 291 # something of the form `t3_xxxxx', where xxxxx can be glommed
292 # into a URL to get to the comments. 292 # into a URL to get to the comments.
293 awk -v SUBREDDIT="$1" -v ALT=i.reddit.com \ 293 gawk -v SUBREDDIT="$1" -v ALT=i.reddit.com \
294 'BEGIN { FS="\t"; OFS="\t"; } 294 'BEGIN { FS="\t"; OFS="\t"; sub("^r_","r/",SUBREDDIT); }
295 { $6 = $3 ALT "/" SUBREDDIT "/" substr($6, 4); } 295 { $6 = "https://" ALT "/" SUBREDDIT "/" substr($6, 4); }
296 { if (match($4,/<a href="([^"]*)">\[link\]<\/a>/,ln)) $3 = ln[1]; } 296 { if (match($4,/<a href="([^"]*)">\[link\]<\/a>/,ln)) $3 = ln[1]; }
297 { gsub(/www\.reddit\.com/, ALT, $0); } 297 { gsub(/www\.reddit\.com/, ALT, $0); }
298 { print; }' 298 { print; }'