Code Monkey home page Code Monkey logo

pokemonsay's Introduction

pokemonsay

You should try pokemonsay!

pokemonsay is like cowsay but for pokémon only. It was inspired by ponysay (cowsay for ponies). Internally, pokemonsay still uses cowsay, so you need it installed too (cowsay... not ponysay).

Installation

Ubuntu

If you simply want to use pokemonsay, the only thing you need installed is cowsay. But you are probably interested in fortune as well, to provide random sayings to your pokémon. To install them both in Ubuntu, simply run:

$ sudo apt-get install fortune cowsay

If you want to rebuild everything in the repository, you will also need img2xterm. img2xterm is used to generate ".cow files" from the pokémon images. To install it you will need to build from source. The instructions are provided on their repository. And if you know an easier way, please tell me!

Keep in mind that pokemonsay will only work if you have cowsay installed and available in your $PATH. To install pokemonsay run these commands in a terminal window:

$ git clone http://github.com/possatti/pokemonsay
$ cd pokemonsay
$ ./install.sh

After the last command, you will have pokemonsay installed in you home folder in ~/.pokemonsay/. And an executable script will be created in ~/bin/pokemonsay, so that you can have pokemonsay in your $PATH too.

It may be necessary to logout and login back again to have pokemonsay in you $PATH. This is specially true if you have never had a ~/bin/ folder before. Your operating system will have it added to you $PATH automatically after the ~/bin/ folder is created... I hope.

OS X

You can install pokemonsay through Homebrew. It is pretty straightforward:

$ brew tap possatti/possatti
$ brew install pokemonsay

Docker

There's an interesting fork by @xaviervia that allows you to run pokemonsay on Docker. Check out xaviervia/docker-pokemonsay.

Usage

Now that you've installed pokemonsay, you can make it work like so:

$ pokemonsay Hello World

To have a random pokémon saying some random thing to you, use fortune:

$ fortune | pokemonsay

And if you really like it, you can add the command above to the end of your ~/.bashrc file (or equivalent). So you will have a random pokémon speaking to you whenever you open a new terminal window! :D

You get a cowthink-like version too. Try it:

$ pokemonthink --pokemon Charmander "Should I wear some clothes?"

Uninstall

Just in case you hate Pokémon and you've installed pokemonsay "by mistake"... Humpf! You can uninstall it by running:

$ sh $HOME/.pokemonsay/uninstall.sh

Building the whole thing

In order to use pokemonsay you don't need to build anything because everything is built already within the repository. But if you want to download the whole images again or make some change in the process, here is how it's done:

# Download pokémon images from Bulbapedia... Thanks bulbapedia!
$ ./scrap_data.sh

# Manipulate the downloaded images, to make the pokémon look
# to the right, and trim the useless space around them.
$ ./fix_images.sh

# Use 'img2xterm' to generate .cow files (for 'cowsay').
$ ./make_cows.sh

And there it is. Now install it with install.sh and you are done.

Special Thanks

A special thanks to my friend Lucas Coutinho Oliveira (@lucascsoliveira) who helped me with some Pokémon wisdom. Thanks buddy!

NOTICE

Please notice I don't own Pokémon or anything related to it. Pokémon is property of The Pokémon Company.

pokemonsay's People

Contributors

arc279 avatar possatti avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

pokemonsay's Issues

Galar Cows (Gen 8) and a new way to build poke-cows

Hello, merry christmas to everyone that still uses this script 🎅

I managed to create cows for the (at the time of this issue) current National Dex, including Galar Pokemon and even regional variants!

📎 galar-cows.zip


And since imagemagick and image2xterm are a PITA to work with, I made a script that builds a Docker image, compiles them and then creates the cows from the png downloaded from bulbapedia (and also because it's 2020 and everything should be build inside a container (?)).

The script also trims the png images since the current sprites have lots of empty/transparent space around them (Eternatus being the biggest one).

Here's the complete script in case you want to take a look.
🐋 POKEMON-SAY.zip

And here's a screenshot of Eternatus on my Xubuntu 18.04 Terminal.

eternatus

Documentation not OS X friendly

The documentation doesn't indicate how to get shuf on OS X.

brew install coreutils
ln -s /usr/local/bin/gshuf /usr/local/bin/shuf

Not working in 2020 😭

I'm SAD 😭 Gotta Catch 'Em All!
https://bit.ly/34mZqn6

 pokemonsay.sh hello
 _______
< hello >
 -------
           \
            \
             \
              \
\e[49m       \e[38;5;236m\N{U+2584}\N{U+2584}\N{U+2584}        \N{U+2584}\e[48;5;236m\e[38;5;67m\N{U+2584}\e[49m\e[38;5;236m\N{U+2584}
      \N{U+2580}\e[48;5;74m\N{U+2584}  \e[48;5;236m\e[38;5;74m\N{U+2584}\N{U+2584}\e[49m\e[38;5;236m\N{U+2584}   \N{U+2584}\N{U+2584}\e[48;5;236m\e[38;5;67m\N{U+2584}\e[48;5;67m \e[48;5;236m\N{U+2584}\e[49m\e[38;5;236m\N{U+2584}
      \e[48;5;236m \e[48;5;74m \e[38;5;67m\N{U+2584}\e[48;5;239m\e[38;5;185m\N{U+2584}\N{U+2584}\e[48;5;74m\e[38;5;239m\N{U+2584} \e[48;5;236m\N{U+2584}\e[49m\e[38;5;236m\N{U+2584}\e[48;5;236m\e[38;5;67m\N{U+2584}\e[48;5;74m \e[48;5;239m\e[38;5;74m\N{U+2584}\e[48;5;67m\e[38;5;239m\N{U+2584}\N{U+2584} \e[48;5;236m \e[49m
   \e[38;5;236m\N{U+2584}\e[48;5;236m\e[38;5;74m\N{U+2584} \e[49m \e[48;5;236m \e[48;5;185m\e[38;5;67m\N{U+2584} \e[48;5;173m\e[38;5;131m\N{U+2584}\e[48;5;131m \e[48;5;239m\N{U+2584}\e[48;5;74m \e[48;5;239m \e[48;5;74m   \e[48;5;239m\e[38;5;67m\N{U+2584}\e[48;5;74m \e[48;5;236m \e[49m
 \e[38;5;236m\N{U+2584}\e[48;5;236m\e[38;5;67m\N{U+2584}\e[48;5;74m \e[38;5;236m\N{U+2584}\e[49m\N{U+2580}  \N{U+2580}\e[48;5;67m\N{U+2584}\e[48;5;131m\e[38;5;67m\N{U+2584}\N{U+2584}\e[48;5;67m\e[38;5;239m\N{U+2584}  \e[48;5;74m\e[38;5;60m\N{U+2584} \e[38;5;67m\N{U+2584} \e[48;5;67m\e[38;5;74m\N{U+2584}\N{U+2584}\e[48;5;236m \e[49m
\e[38;5;236m\N{U+2584}\e[48;5;236m\e[38;5;67m\N{U+2584}\e[48;5;67m\e[38;5;60m\N{U+2584}\N{U+2584}\e[48;5;236m\e[38;5;239m\N{U+2584}\e[49m\e[38;5;236m\N{U+2584} \N{U+2584}\e[48;5;236m\e[38;5;74m\N{U+2584}\e[48;5;74m \e[48;5;239m\N{U+2584} \e[48;5;67m  \e[48;5;60m\e[38;5;67m\N{U+2584}\e[48;5;231m \e[48;5;236m\e[38;5;203m\N{U+2584}\e[48;5;74m\e[38;5;236m\N{U+2584}\e[48;5;67m\e[38;5;60m\N{U+2584}\e[48;5;74m   \e[48;5;236m \e[49m
\e[48;5;236m \e[48;5;60m\e[38;5;67m\N{U+2584}\e[48;5;67m   \e[48;5;239m\N{U+2584}\e[48;5;236m\e[38;5;239m\N{U+2584}\e[48;5;239m\e[38;5;67m\N{U+2584}\e[48;5;74m\e[38;5;239m\N{U+2584}\e[48;5;67m\e[38;5;74m\N{U+2584}\e[48;5;239m\N{U+2584}\e[38;5;67m\N{U+2584}\e[48;5;67m\e[38;5;239m\N{U+2584}\e[48;5;239m\e[38;5;67m\N{U+2584}\e[48;5;185m\e[38;5;239m\N{U+2584}\e[48;5;67m\e[38;5;185m\N{U+2584}\N{U+2584}\N{U+2584}\e[48;5;74m\N{U+2584}\e[48;5;67m\e[38;5;239m\N{U+2584}\e[48;5;74m\N{U+2584}\e[48;5;236m \e[49m
 \e[48;5;236m \e[48;5;67m   \e[48;5;239m \e[48;5;67m \e[38;5;74m\N{U+2584}\e[48;5;239m\N{U+2584}\e[48;5;74m\e[38;5;239m\N{U+2584}\e[38;5;67m\N{U+2584} \e[38;5;231m\N{U+2584}\e[48;5;239m \e[48;5;67m\e[38;5;222m\N{U+2584}\e[48;5;239m\N{U+2584}\e[38;5;186m\N{U+2584}\e[48;5;236m \e[49m\e[38;5;236m\N{U+2580}\e[48;5;67m\N{U+2584}\e[38;5;231m\N{U+2584}\e[48;5;231m\e[38;5;67m\N{U+2584}\e[48;5;236m \e[49m
  \e[38;5;236m\N{U+2580}\e[48;5;67m\N{U+2584}\e[48;5;239m \e[48;5;60m\e[38;5;67m\N{U+2584}\e[48;5;74m    \e[48;5;239m \e[38;5;131m\N{U+2584}\N{U+2584}\e[48;5;222m\N{U+2584}\e[48;5;131m\e[38;5;185m\N{U+2584}\e[38;5;239m\N{U+2584}\e[48;5;239m\e[38;5;67m\N{U+2584}\e[48;5;67m \e[48;5;236m \e[49m \e[38;5;236m\N{U+2580}\N{U+2580}
    \e[48;5;236m \e[48;5;67m \e[48;5;60m\e[38;5;67m\N{U+2584}\e[48;5;74m\e[38;5;60m\N{U+2584}\N{U+2584}\e[48;5;60m\e[38;5;67m\N{U+2584}\e[48;5;239m\e[38;5;236m\N{U+2584}\e[48;5;185m\N{U+2584}\e[48;5;179m\N{U+2584}\e[49m\N{U+2580}\e[48;5;236m \e[48;5;67m\N{U+2584}\e[48;5;60m\N{U+2584}\e[49m\N{U+2580}
     \e[48;5;236m \e[48;5;67m\e[38;5;231m\N{U+2584}\e[38;5;60m\N{U+2584}\e[38;5;231m\N{U+2584}\e[48;5;236m \e[49m
      \e[38;5;236m\N{U+2580}\N{U+2580}\N{U+2580}\e[39m

Pokemonsay doesn't add to path even after logging out and in again

Hey,
I was so thrilled have this project sent to me via slack from someone at work last year.

I absolutely love pokemon and pokemonsay brings me joy throughout my working day, so many thanks for developing it :).

so I recently got a new laptop for work and installed fortune, cowsay and pokemonsay it as per the instructions.

At the end of the script you're advised to logout and back in again so you can be sure it adds to your path.

I didn't have this issue on my previous laptop when I installed pokemonsay, but with my new laptop I found after logging back in, it seems like pokemonsay wasn't on my path when I echo $PATH .

There was however still ~/masquerainsley/bin which had both pokemonsay and pokemonthink there. So I ended up moving both of those into my path manually with sudo mv pokemonthink /usr/bin , restarted my shell and bam it worked in the end.

Posting this for any aspiring devs that love pokemon but aren't that familiar with Linux :).

Unicode characters are not supported

/ # ./root/bin/pokemonsay фывафва
 ________________ 
< ÑÑваÑва >
 ---------------- 
           \
            \
             \
              \
        ▄▄▄▄
       ▄▄  ▄▄▄ 
   ▄▄▄▄▄▄▄ ▄   
 ▄▄▄▄ ▄▄ ▄ ▄▄▄  ▄▄▄▄▄
 ▀ ▄  ▄▄▄ ▄▄ ▄▄▄▄▄   
  ▄▄▄▄▄▄▄ ▄▄▄ ▄▄▄   ▄▄
 ▄▄▄ ▄ ▄▄ ▄  ▄▄▄ ▄▄ ▄▄▄ 
  ▄▄▄▄▄ ▄ ▄ ▄▄ ▄▄ ▄ ▄ ▄▀
  ▀▀▀    ▄  ▀▄▄▄  ▄▄▄▀
       ▀▄▄▄▀    ▀▀▀

Rhyhorn

screen shot 2016-10-04 at 13 22 20

Scrapper has trouble with special characters when using National Dex + National cows

After some trouble (mostly imagemagick) i managed to create cows for every pokemon in the national dex*.

The scrapper script has troubles when the alt attribute has special characters in it ("Tapu Koko", "Mr. Mime", "Type:Null"). I modified it a little to use https and read the src attribute that uses // instead of http:// or https://

I hope this is helpful 👍

scrap_data.sh.zip
NationalCows.zip

*Lycanroc Midnight form isn't listed in Bulbapedia's National Dex and it's too late to care now

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.