Created
December 1, 2016 04:01
-
-
Save t94j0/f1ff7ffabee2dc31e7ec2ac5657d4289 to your computer and use it in GitHub Desktop.
Remember to always be on top of your memes
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
function meme | |
curl -s https://www.reddit.com/r/me_irl.json > /tmp/me_irl.json | |
open (python3 -c " | |
import json | |
import random | |
imgurs = [] | |
with open('/tmp/me_irl.json') as f: | |
parsed = json.loads(f.read()) | |
for images in parsed['data']['children']: | |
if images['data']['domain'] == 'imgur.com': | |
imgurs.append(images['data']['url']) | |
print(imgurs[random.randint(0,len(imgurs))]) | |
" > /dev/null) > /dev/null | |
echo "I have created a meme" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment