dotfiles-remastered/.local/share/scripts/reddit-wp.sh
2020-06-15 16:51:47 +02:00

10 lines
306 B
Bash
Executable File

#!/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"