Hacker News new | past | comments | ask | show | jobs | submit login

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




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.


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


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


Do cowsay templates allow you to set the color for each character?


I tested and indeed you can use ANSI escape sequences in cowsay templates.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: