Created
August 1, 2016 13:24
-
-
Save tail-call/48426cfd12696940b7417a37f8b741f4 to your computer and use it in GitHub Desktop.
Pony wallpapers!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
curl "https://derpibooru.org/tags/wallpaper/random_img.json?filter_id=56027" | | |
sed -e 's/{"id":"\([0-9]*\)"}/https:\/\/derpibooru.org\/\1.json\n/g' | | |
xargs curl | | |
# -P switch for Perl syntax (.*? - non-greedy match) | |
grep -o -P '"image":".*?"' | | |
sed -e 's/"image":"\(.*\)"/https:\1/' | | |
xargs feh --bg-fill |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment