blob: 986f142c558f47b0223418af17ebf23529c83d76 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
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/$/>/
}
'
|