all repos — dotfiles @ 81ec19b9492c3ab1ebdb105740a3a411c241da2a

linux dotfiles

update reddit browse script
Prithu Goswami prithugoswami524@gmail.com
Tue, 08 Dec 2020 09:41:02 +0530
commit

81ec19b9492c3ab1ebdb105740a3a411c241da2a

parent

eeea0dcb6dacde305ca3ea998852ae4c6c0525e4

1 files changed, 6 insertions(+), 0 deletions(-)

jump to
M bin/scripts/reddit-browsebin/scripts/reddit-browse

@@ -1,5 +1,7 @@

#!/usr/bin/bash +set -o pipefail + [ -z $1 ] && exit 0 after=""

@@ -14,6 +16,10 @@ fi

wget --quiet -O - "$url" |\ tee /tmp/rtmp.json | jq '.data.children[] |.data.url' |\ grep -E 'jpg|png"$' | xargs feh -F 2>/dev/null + + cat /tmp/rtmp.json | jq -r '.data.children[] |.data.url' |\ + grep -E '(redgifs|gfycat|v.red)' | xargs mpv + after=$(cat /tmp/rtmp.json | jq '.data.after' | tr -d '"') printf "continue? [y/n]: "; read ans [ $ans = "n" ] && exit 0