From b2f81bd66490bdb97855212494dc83379b250381 Mon Sep 17 00:00:00 2001 From: "Thomas A. Christensen II" <25492070+MillironX@users.noreply.github.com> Date: Tue, 23 Nov 2021 17:15:22 -0600 Subject: [PATCH] Add three-eyes cowfile Signed-off-by: Thomas A. Christensen II <25492070+MillironX@users.noreply.github.com> --- docs/src/cows.md | 1 + src/Cowsay.jl | 1 + src/cows/three-eyes.cow.jl | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 34 insertions(+) create mode 100644 src/cows/three-eyes.cow.jl diff --git a/docs/src/cows.md b/docs/src/cows.md index 6ee8b11..014e68b 100644 --- a/docs/src/cows.md +++ b/docs/src/cows.md @@ -12,6 +12,7 @@ Cowsay.mutilated Cowsay.skeleton Cowsay.small Cowsay.supermilker +Cowsay.three_eyes Cowsay.udder Cowsay.vader Cowsay.www diff --git a/src/Cowsay.jl b/src/Cowsay.jl index ba1a289..2f097ef 100644 --- a/src/Cowsay.jl +++ b/src/Cowsay.jl @@ -26,6 +26,7 @@ include("cows/small.cow.jl") include("cows/stegosaurus.cow.jl") include("cows/supermilker.cow.jl") include("cows/surgery.cow.jl") +include("cows/three-eyes.cow.jl") include("cows/udder.cow.jl") include("cows/vader-koala.cow.jl") include("cows/vader.cow.jl") diff --git a/src/cows/three-eyes.cow.jl b/src/cows/three-eyes.cow.jl new file mode 100644 index 0000000..19b067b --- /dev/null +++ b/src/cows/three-eyes.cow.jl @@ -0,0 +1,32 @@ +""" + function three_eyes() + +A cow with three eyes, brought to you by dpetrou@csua.berkeley.edu + +# Example +```jldoctest +julia> cowsay("The better to see you with...", cow=Cowsay.three_eyes) + _______________________________ +< The better to see you with... > + ------------------------------- + \\ ^___^ + \\ (ooo)\\_______ + (___)\\ )\\/\\ + ||----w | + || || +``` + +""" +function three_eyes(;eyes="oo", tongue=" ", thoughts="\\") +eye = first(eyes) +eyes = repeat(eye, 3) +the_cow = +""" + $thoughts ^___^ + $thoughts ($eyes)\\_______ + (___)\\ )\\/\\ + $tongue ||----w | + || || +""" +return the_cow +end