summaryrefslogtreecommitdiff
path: root/cowsay
diff options
context:
space:
mode:
authorFreeArtMan <dos21h@gmail.com>2015-12-05 22:41:33 +0000
committerFreeArtMan <dos21h@gmail.com>2015-12-05 22:41:33 +0000
commite6add15b639d94ddf9cc0f00e2e0d12ebbae5597 (patch)
treead752ea798d0cabb770b5d17e72e3828b610d7af /cowsay
parent5dd7be8251a68a4e6c340f234d697e02108e097b (diff)
downloadcode-snippets-e6add15b639d94ddf9cc0f00e2e0d12ebbae5597.tar.gz
code-snippets-e6add15b639d94ddf9cc0f00e2e0d12ebbae5597.zip
Added coffee,pool,cat
Diffstat (limited to 'cowsay')
-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