dotfiles-remastered/.local/share/scripts/reddit-wp.sh

10 lines
306 B
Bash
Raw Normal View History

2020-06-15 14:51:47 +00:00
#!/usr/bin/env sh
# required packages:
# - wget
# - jq
set -e
#wget -O - http://www.reddit.com/r/wallpapers.rss 2> /dev/null | grep -Eo "https://?[^&]+(jpg|png)" | grep -v "thumbs" | head -1
wget -O - "http://www.reddit.com/r/wallpapers/top/.json?t=day" 2> /dev/null | jq -r ".data.children[0].data.url"