-
-
Save bfu4/549defe160ac8b8c0d9e160ffdb65276 to your computer and use it in GitHub Desktop.
./waifuapi <endpoint> (Mac)
This file contains hidden or 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/bash | |
cd ~/.Trash | |
NAME=`echo "$1" | awk -F/ '{print $4}'` | |
wget "$1" -q | |
viu ~/.Trash/"$NAME" | |
rm ~/.Trash/"$NAME" |
This file contains hidden or 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/bash | |
# Check args | |
if [[ -z "$1" ]]; then | |
echo "missing args" | |
exit -1 | |
fi | |
out=`curl -s https://api.waifu.pics/sfw/"$1" | jq -r '.url'` | |
./viul "$out" | |
echo "$out" | pbcopy # URL goes to the clipboard |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Would suggest iTerm for this to display correctly