diff options
author | FreeArtMan <dos21h@gmail.com> | 2015-02-18 13:16:00 +0900 |
---|---|---|
committer | FreeArtMan <dos21h@gmail.com> | 2015-02-18 13:16:00 +0900 |
commit | bf168400819ebfffb0128d5a96bbb6a5c40e1360 (patch) | |
tree | a8546a6901b8d1bb33a0b1358c6b091733a0bd6a | |
parent | 670e03997afca107abbfc61a61f89477a9f9ab82 (diff) | |
download | code-snippets-bf168400819ebfffb0128d5a96bbb6a5c40e1360.tar.gz code-snippets-bf168400819ebfffb0128d5a96bbb6a5c40e1360.zip |
Cowsay. various small ascii pictures where you can add string and dispaly it in da some picture
-rw-r--r-- | cowsay/cowsay.lua | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/cowsay/cowsay.lua b/cowsay/cowsay.lua new file mode 100644 index 0000000..3aa1e6f --- /dev/null +++ b/cowsay/cowsay.lua @@ -0,0 +1,23 @@ + + +function ascii_nerd( name ) + local s = "" + s = s .. [[ + +\ | | / +| o o | + \ O / + | | +]] + local l = string.len(name) + for i=1,l+4 do s = s .. "+" end + s = s .. "\n| " .. name .. " |\n" + for i=1,l+4 do s = s .. "+" end + return s +end + +for k,v in ipairs(arg) do + if v == "nerd" then + print( ascii_nerd( arg[k+1] ) ) + end +end |