https://github.com/dbernheisel/expokesay
Pokemon sprite to color ASCII
https://github.com/dbernheisel/expokesay
Last synced: 7 months ago
JSON representation
Pokemon sprite to color ASCII
- Host: GitHub
- URL: https://github.com/dbernheisel/expokesay
- Owner: dbernheisel
- Created: 2019-09-19T04:20:37.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-02-01T23:57:01.000Z (about 6 years ago)
- Last Synced: 2025-01-23T01:31:22.989Z (about 1 year ago)
- Language: Shell
- Size: 899 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Pokesay

Stupid scripts that does this:
* Scrapes https://bulbapedia.bulbagarden.net/wiki/List_of_Pokémon_by_National_Pokédex_number
* Downloads the sprite PNGs to ./sprites
* Trims the PNGs using imagemagick
* Converts the PNGs to `.cow` files for cowsay into `./cows`
* Converts the PNGs to `.sh` files for executables that will print to terminal. `./sh`
## Requirements
* Elixir and Erlang installed
* [img2xterm]
* [imagemagick]
[img2xterm]: https://github.com/denilsonsa/img2xterm
[imagemagick]: https://imagemagick.org
## Usage
Start with `iex -S mix`
```elixir
# Grab the PNGs first.
Pokesay.scrape()
# Then convert them to what you want.
Pokesay.generate_bash()
Pokesay.generate_cows()
```
or use the Mix tasks:
```bash
mix Generate bash
mix Generate bash overwrite
mix Generate cows
```
Once you have your generated Pokemon bash files, you can do nifty things like
randomly print on when you open your terminal
```sh
# First copy the pokemon files into some more permanent location
cp -Rv ./sh ~/.pokesay
# in ~/.zlogin or ~/.bash_login
if [ -d "$HOME/.pokesay" ]; then
source "$(find "$HOME/.pokesay" -type f | shuf -n 1)"
fi
```
There's another example [committed here](./scroll-pokemon.sh)
## Credits
https://github.com/possatti/pokemonsay