This script is inspired by this project, but since the output heavily depends on the font of your terminal, I decided to make a script that shows a true PNG image of the Pokémon (of course, this script requires a terminal that supports images).
Important: this program relies on viuer, so check if your terminal is supported first.
To use the script, you must first install the required dependencies:
- a supported terminal
Python 3.9.xor newer- Run:
pip install -r requirements.txt
After making sure that you have all of the requirements, run the following command:
git clone https://github.com/aflaag/pokemon-icat && cd pokemon-icat && sh install.shwhich should start the installation process of the script, by downloading every picture of every Pokémon.
Note that this script will add an environment variable $POKEMON_ICAT_DATA which is used by the binary at runtime, and a pokemon-icat call so that a Pokémon is shown every time you open a terminal. To achieve this, the script modifies the following files, depending on your shell:
$HOME/.profile$HOME/.bashrc(bash)$HOME/.zprofileand$HOME/.zshrc(zsh)$HOME/.config/fish/config.fish(fish)
With any other shell, or to add it by hand, put this at the end of your shell config (any of the options described in Usage can be added to the call):
# ~/.bashrc or ~/.zshrc
export POKEMON_ICAT_DATA="$HOME/.local/share/pokemon-icat"
pokemon-icat
# ~/.config/fish/config.fish
set -gx POKEMON_ICAT_DATA $HOME/.local/share/pokemon-icat
if status is-interactive
pokemon-icat
endSome users reported that a reboot was necessary for the program to function correctly.
Moreover, by default this will download every Pokémon with an upscaling factor of the original image of 3, but if you want to change this behaviour run the last command with the option --upscale <FACTOR>, for example:
sh install.sh -u 15If you would like to contribute, an AUR package would be awesome!
The current flake does not work yet, it is still WIP.
To show a random Pokémon, simply run:
pokemon-icatIf you want to specify one or more generations in particular, simply add --generations <GENERATIONS> at the end, for example (note: the generations must be comma-separated, and trailing commas are not supported):
pokemon-icat -g 3,4,Hisui,5Shiny Pokémons are supported too, and the default shiny rate can be changed as follows:
pokemon-icat --shiny-probability=10If you want to show a Pokémon in particular, just use the --pokemon <POKEMON> flag, for example:
pokemon-icat -p charizardand if you want to suppress the Pokémon info, use the --quiet flag:
pokemon-icat -p charizard -qPokémon names and generation labels can be shown in English (default), French or Japanese with --lang <en|fr|ja>:
pokemon-icat -p gyarados -l fr # Léviator, Génération I
pokemon-icat -p Léviator -l ja # ギャラドス, 第1世代To make it the default, set POKEMON_ICAT_LANG in your shell config:
# ~/.bashrc or ~/.zshrc
export POKEMON_ICAT_LANG=fr
# ~/.config/fish/config.fish
set -gx POKEMON_ICAT_LANG fr--pokemon accepts the name in any of these languages. The localized names live in extra columns of bin/pokemon_data.csv (the name column stays the icon file name) and are generated from PokeAPI; to refresh them, run:
python3 update_names.pyTo check all the available options, use the --help option.
- Multiple images return an error while downloading because they do not exist
- Last DLC pokemons don't get downloaded (change the csv when this is fixed)
- Image
678.pngdoesn't get downloaded
- AUR package (very requested)
- Nix package (WIP)
- rename the other images to include every available sprite
- do they contain regional forms?
Check out development.md

