all repos — dotfiles @ d3c47eb2c480bbedc4adc990c2ca0700f0178a26

linux dotfiles

bin/scripts/get-ep-walls

1 2 3 4 5 6 7 8 9 10 11 12 13
#!/bin/sh
epdir="$HOME/pictures/ep"
if [ -d $epdir ]
then
    cd "$epdir"
    wget reddit.com/r/earthporn.json || exit
    cat earthporn.json | jq '.data.children[] .data.url' | tr -d '"' |\
        grep -E "jpg|png$" | xargs wget
    rm *json
else
    printf "$epdir doesn't exist\n"
    exit
fi