
Pokemonsay: Pokemon Version of Cowsay - polm23
https://github.com/dfrankland/pokemonsay
======
codetrotter
While it does support a few additional options according to the README, I
think this whole project could have consisted of no code at all and just
cowsay template files that you’d copy to the cowsay template directory.
Typically /usr/share/cows/

Here is an example of a third-party template for cowsay:
[https://github.com/lochsh/alpacasay/blob/master/alpaca.cow](https://github.com/lochsh/alpacasay/blob/master/alpaca.cow)

~~~
Klathmon
Most of the code here is for scraping images from a 3rd party and converting
them into colored blank spaces to display in the terminal.

The actual code used to pick a random Pokemon and display it is only a few
dozen lines.

~~~
sswezey
Where does the conversion from .png to tiles happen? Is it part of boxen? I
can't seem to locate it within the source.

~~~
Klathmon
It's kinda hidden in the webpack config using a loader (written by the same
guy!) that does the heavy lifting

[https://github.com/dfrankland/image-xterm-
loader](https://github.com/dfrankland/image-xterm-loader)

------
floor_
Imagine installing node.js and a json parser and 10+ other things just for a
cowsay clone. I can't imagine what a clean install of all this crap would be
just for this project.

~~~
Klathmon
Can we not do this? It's just as valid to have this kind of little thing
written in node as it is to have it written in Perl.

One person's complaint about a json parser being too heavyweight is just as
valid as the complaints that the arcane one-off cow template syntax is hard to
use and understand.

Not to mention that this has different features than cowsay, and it's just a
fun little project. It parses image files into the terminal display, it can
scrape 3rd party websites to download new Pokemon images.

~~~
JasonFruit
I think we _should_ do this. When writing a tiny, trivial utility, it doesn't
make sense to bring in a ton of dependencies. Disk space, memory usage, and
download size all matter, especially to those of us who use old hardware on
rural satellite connections.

Your final paragraph had a good point, though. It's not just cowsay.

~~~
jandeboevrie
I agree. Fat shaming for software. Otherwise you'll end up with a terminal
emulator written with electron. Oh wait, that already exists.

But seriously. If you don't tell people politely and explain what and why it's
wrong, they'll never know that what they're doing could be better. Just
ranting and shaming might not be the best way. Still I agree with all the
NodeJS hate.

~~~
BFatts
What hate do you refer to, and why do you agree with it?

What's wrong with having a rapid development ecosystem within which to build
that is fairly simple to install, run, and cycle? JavaScript, and NodeJS by
extension, are just as viable as languages as any other out there. There are
languages, such as Rust or Go, that people tout their benefits. However, I see
no simple way to get an env set up, learn the language, and turn around
anything of meaning in the time I could in JavaScript. There are some
deficiencies in the platform, surely, but those (as I would expect) get
resolved over time.

I could make the same argument about having to get a JRE or a Python
interpreter. Each language is going to have its deficiencies and bonuses.

------
rahuldottech
I find it curious how programmers are so poor at naming their projects. This
could've easily been named pokésay.

That said, it's a cool project!

~~~
swebs
>This could've easily been named pokésay

Not for users with a US keyboard

~~~
bilkow
Just use English / US (International), it will make "é" become ' \+ e and
allow lots of other combinations.

------
danjordan
I built something similar, but it uses pokefusion
([https://pokemon.alexonsager.net/](https://pokemon.alexonsager.net/)) to
generate randomly fused Pokemon

[https://github.com/danjordan/pokefusion](https://github.com/danjordan/pokefusion)

You can run it with `npx pokefusion`

~~~
plumeria
Nice one. The combination of Flareon and Magneton looks like something from
Futurama.

Edit: nitpick: have the selectors ordered alphabetically.

------
loser777
Awesome, but given Nintendo's history I have to ask if this is the type of
thing that provokes a cease-and-desist.

~~~
CM30
Generally they tend to mostly go after games starring their characters, and
usually leave other types of fan works alone. They also don't go after all fan
games either, with 99% of them being left alone and close to 100% of ROM hacks
being in the same boat. It's also mostly remakes/games rather similar to
remakes or official games that get targeted in most cases too.

So no, I don't think this is going to provoke a cease and desist. It's not
competing with anything official, and barely even counts as a fan work at all.

------
bouvin
Another variant is Ponysay:
[https://github.com/erkin/ponysay/](https://github.com/erkin/ponysay/)

------
swebs
So how do you run this? I just see a bunch of javascript files.

~~~
rovr138
You need to have Node.js installed - [https://nodejs.org](https://nodejs.org)

After that, then it seems like you can execute `node dist/cli.js` for it. So
just pipe to that.

~~~
haveyaseen
If you want to run it from source then clone it and run `npm run start` which
will run `npm run build && node ./dist/cli.js` for you (see the scripts entry
in the package.json)

------
CM30
Probably a bit of a silly question, but are the new Pokemon from Ultra
Sun/Ultra Moon and GO/Let'a Go Pikachu/Eevee going to be added to this?

Because the former added Zeraora as well as Poipole, Naganadel, Stakataka and
Blacephalon (along with new Necrozma forms), whereas the latter added Meltan
and Melmetal. Would be nice to see them added for completeness sake, though it
raises the question of how 'complete' these joke projects should be character
wise, especially when dealing with series that introduce about 100 new
characters every three or so years.

~~~
falsedan
Try building it and see which mons are included. I guess you can always
publish your own version on NPM when the details for each new generation are
available!

For Necrozma, its extra forms don't have pokédex entries so this tool doesn't
scrape them from Bulbapedia.

------
Haydos585x2
I really like this module and love the idea. The images are far too big though
especially compared to cowsay/cowthink.

~~~
Klathmon
This might be a bit off topic, but what are your options for putting images or
"image like" drawings in the terminal now days?

This seems to just use blank spaces with terminal background color codes to
draw things, which means your smallest "pixel" is the size of a terminal line.

Are there ways of getting higher definition in a terminal with fairly
widespread support and keeping full color?

The hacker part of me is thinking with some combination of finding Unicode
characters that "fit" an outline combined with color quantization (since every
"character" has to be one color at most) might be able to cut the size in
half...

~~~
lloeki
Those ones use half-height blocks I think, which goes a loooong way already.

[https://github.com/sindresorhus/terminal-image-
cli](https://github.com/sindresorhus/terminal-image-cli)

[https://github.com/atanunq/viu](https://github.com/atanunq/viu)

------
kawsper
Have they modified their terminal in the screenshot or how are they managing
to get perfectly square "pixels" in the terminal?

~~~
pszndr
It's just 2 empty space characters

------
phailhaus
This is fantastic! It would be really great if the CLI supported summoning a
specific Pokemon, is that planned at all?

------
carc1n0gen
I'm curious how close to this you could get with regular cowfiles for cowsay.

------
rmetzler
Ok, who volunteers to create an output plugin for Ansible?

