A command-line app using the Safebooru + Danbooru API to show anime fanart in your terminal.
Download show-waifu-1.0.0.tar.gz
from releases and extract it using
either a GUI or the command line.
If you're using the command line run
sh
tar -xf show-waifu-1.0.0.tar.gz
Move the show-waifu
executable into your bin
```sh
mkdir -p ~/bin mv show-waifu ~/bin ```
Test it to see if it works, it should output an image in your terminal
sh
~/bin/show-waifu
To make show-waifu
available everywhere on the command line,
add ~/bin to $PATH and reload the Bash configuration
sh
echo 'export PATH=~/bin:$PATH' >> ~/.bash_profile
source ~/.bash_profile
Test it again and if it works, you're all set to use it!
sh
show-waifu
Safebooru | Danbooru | |
---|---|---|
Safe for work | Fairly safe | Not really safe |
Searching |
|
|
Image details |
|
|
More details can be found below
Searching: Safebooru's cheatsheet + Danbooru's cheatsheet
Image ratings: Safebooru's image ratings + Danbooru's image ratings
For Anonymous and Member-level users, authentication provides no benefits.
Depending on your account level, authenticating comes with some benefits: an increased tag limit and a longer search timemout length. You can authenticate by doing the following:
Go to your user profile and generate an API key by clicking the "Generate API key" button
Create 2 environmental variables DANBOORU_USERNAME
and DANBOORU_API_KEY
and add it to ~/.bashrc
sh
echo 'export DANBOORU_USERNAME="your-name-here"' >> ~/.bashrc
echo 'export DANBOORU_API_KEY="api-key-here"' >> ~/.bashrc
Add this snippet to ~/.bash_profile
sh
echo "if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi" >> ~/.bash_profile
Check your environmental variables and search for more than 2 tags to verify it works
```sh
printenv | grep -E '(DANBOORUUSERNAME|DANBOORUAPI_KEY)'
show-waifu dan --safe --tags="whentheimposterissus(meme) jerma985 catboy catpaws catears chartags:1" ```
Read from stdin and show an image
sh
curl -s https://pbs.twimg.com/media/DoWo3unU4AA2etL\?format\=jpg\&name\=large | show-waifu
Search for a specific image on Safebooru based on tags, and print details
sh
show-waifu safe --details --tags="ncr_veteran_ranger night~"
Use a local file and change its height for viewing
sh
show-waifu --height 10 file ~/Pictures/doge.jpg
``` USAGE: show-waifu [OPTIONS] [SUBCOMMAND]
FLAGS: --help Prints help information -V, --version Prints version information
OPTIONS:
-h, --height
SUBCOMMANDS: dan Look at random images from Danbooru file View an image from your file system help Prints this message or the help of the given subcommand(s) safe Look at random images from Safebooru url View an image from a url ```
``` USAGE: show-waifu dan [FLAGS] [OPTIONS]
FLAGS: -d, --details Show data related to image (artist, source, character, url, rating, dimensions, tags) -e, --explicit Only display images with explicit sexual content -h, --help Prints help information -q, --questionable Only display images with some nox-explicit nudity or sexual content -s, --safe Only display images lacking sexual content. Includes lingerie, swimsuits, innocent romance, etc. NOTE: this doesn't mean "safe for work." -V, --version Prints version information
OPTIONS:
-k, --key
``` USAGE: show-waifu safe [FLAGS] [OPTIONS]
FLAGS: -d, --details Show data related to image (url, rating, dimensions, tags) -h, --help Prints help information -q, --questionable Only display images with suggestive content -V, --version Prints version information
OPTIONS:
-t, --tags