diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2016-10-13 11:28:42 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2016-10-13 11:28:42 +1300 |
commit | 0417c448fce3bd98522b66f89b4b5219aaf40758 (patch) | |
tree | 17f71c881beaaba9dfd5601cae602fce8e78fbdc /rdt | |
download | rdt-0417c448fce3bd98522b66f89b4b5219aaf40758.tar.gz rdt-0417c448fce3bd98522b66f89b4b5219aaf40758.zip |
Diffstat (limited to 'rdt')
-rwxr-xr-x | rdt | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -0,0 +1,11 @@ +#!/bin/sh +# Get the titles of posts in a given subreddit (defaults to /r/all) +curl -A Mozilla https://reddit.com/r/"${1:-all}"/"${2:+"$2"/}".compact | +pup -p 'p.title > a' 'json{}' | +jq -M -r '.[] | .text,.href' | +sed ' +/^http/{ + s/^/ </ + s/$/>/ +} +' |