aboutsummaryrefslogtreecommitdiffstats
path: root/cowsay/cowsay.lua
diff options
context:
space:
mode:
Diffstat (limited to 'cowsay/cowsay.lua')
-rwxr-xr-x[-rw-r--r--]cowsay/cowsay.lua49
1 files changed, 48 insertions, 1 deletions
diff --git a/cowsay/cowsay.lua b/cowsay/cowsay.lua
index f91d1b0..a596e96 100644..100755
--- a/cowsay/cowsay.lua
+++ b/cowsay/cowsay.lua
@@ -1,4 +1,4 @@
-
+#!/usr/bin/lua
--------------------------------------------------------------------------------
-- my drawing
function ascii_nerd( name )
@@ -85,6 +85,47 @@ function ascii_juice( name1, name2 )
end
--------------------------------------------------------------------------------
+-- http://ascii.co.uk/art/coffee
+function ascii_coffee( name )
+ local s = ""
+ if name == nil then name = "Single Expresso" end
+ if name ~= nil then name = "Single Expresso for " .. name end
+
+s = s .. [[ .-=-.
+ ,|`~'|
+ `| | ]] .. name .. [[
+ `~']]
+
+ return s
+end
+--------------------------------------------------------------------------------
+--http://ascii.co.uk/art/pool
+function ascii_pool( name )
+ local s = ""
+ if name == nil then name = "" end
+
+s = s .. [[,_____,_____, 6 __
+T\ :. .^\,_/_\_I_ ]] .. name .. [[
+I ^T=====;=====T /|
+ I I _|_|]]
+
+ return s
+end
+--------------------------------------------------------------------------------
+--http://ascii.co.uk/art/cat
+function ascii_cat( text )
+ local s = ""
+ if text == nil then text = "mmeeoowwrr!" end
+
+s = s .. [[
+ ) _. ]] .. text .. [[
+ (___)''
+ / ,_,/
+ /'"\ )\]]
+ return s
+end
+
+--------------------------------------------------------------------------------
for k,v in ipairs(arg) do
if v == "nerd" then
print( ascii_nerd( arg[k+1] ) )
@@ -94,5 +135,11 @@ for k,v in ipairs(arg) do
print( ascii_shoot( arg[k+1] ) )
elseif v == "juice" then
print( ascii_juice( arg[k+1], arg[k+2]))
+ elseif v == "coffee" then
+ print( ascii_coffee( arg[k+1] ))
+ elseif v == "pool" then
+ print( ascii_pool( arg[k+1] ))
+ elseif v == "cat" then
+ print( ascii_cat( arg[k+1] ))
end
end