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

13 lines
370 B
Bash
Raw Normal View History

2020-06-15 14:51:47 +00:00
#!/usr/bin/env sh
# required packages:
# - wget
# - jq
set -e
# There are 2 subreddits "wallpapers" and "wallpaper" the 2nd one is bigger.
# wget -O - "http://www.reddit.com/r/wallpapers/top/.json?t=day" 2> /dev/null | jq -r ".data.children[0].data.url"
wget -O - "http://www.reddit.com/r/wallpaper/top/.json?t=day" 2> /dev/null | jq -r ".data.children[0].data.url"