You are not logged in.
so i've been trying to hone my bash skills recently.
this weekend i made an ansi art version of ryu from the nintendo nes game ninja gaiden. after making a colored version i wanted to echo it in bash. after a little while i came up with a little script that measures your terminal size and "pads" the image evenly with periods on either side. it also has a few options for rendering types, version info, help, etc.
tl;dr
i'd like some feedback on my bash code. suggestions on what i could have done better, things to make the script smaller, more cross compatible, etc. here's the code: https://github.com/syntax-samurai/ryu/blob/master/ryu
feel free to answer in the thread or fork the project on github. this project is just for fun and learning.
thanks in advance.
▬▬ι═══════ﺤ
http://git.io/.files
Offline
Offline
yeah. it's a very subtle difference. they're both methods of text based art. but if you draw using the `box drawing characters` and call it ASCII, the scene jumps down your throat ;D
▬▬ι═══════ﺤ
http://git.io/.files
Offline
Looks fine to me, although the last `exit` is superfluous. If you wanted to get rid of all those `echo` calls and the extra version of your image, you could use a heredoc. To get colors in the heredoc just throw the escape codes into functions that check whether '--grey' or '--color' is set and use command substitution.
Offline