From bf168400819ebfffb0128d5a96bbb6a5c40e1360 Mon Sep 17 00:00:00 2001 From: FreeArtMan Date: Wed, 18 Feb 2015 13:16:00 +0900 Subject: Cowsay. various small ascii pictures where you can add string and dispaly it in da some picture --- cowsay/cowsay.lua | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 cowsay/cowsay.lua 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 -- cgit v1.2.3