4 ms·
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 templa
by codetrotter 7y ago
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
- ihuman 7y agoDo cowsay templates allow you to set the color for each character?
- skykooler 7y agoI tested and indeed you can use ANSI escape sequences in cowsay templates.
- Klathmon 7y agoMost 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 7y agoWhere does the conversion from .png to tiles happen? Is it part of boxen? I can't seem to locate it within the source.
- Klathmon 7y agoIt'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