From 85e83e784d2dad79fc476b240538fe69a6269921 Mon Sep 17 00:00:00 2001 From: "Thomas A. Christensen II" <25492070+MillironX@users.noreply.github.com> Date: Tue, 23 Nov 2021 16:24:28 -0600 Subject: [PATCH] Add mech-and-cow 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/mech-and-cow.cow.jl | 55 ++++++++++++++++++++++++++++++++++++ 3 files changed, 57 insertions(+) create mode 100644 src/cows/mech-and-cow.cow.jl diff --git a/docs/src/cows.md b/docs/src/cows.md index feff134..318df61 100644 --- a/docs/src/cows.md +++ b/docs/src/cows.md @@ -8,6 +8,7 @@ Examples of all the cowfiles available. Cowsay.default Cowsay.cower Cowsay.dragon_and_cow +Cowsay.mech_and_cow Cowsay.udder Cowsay.vader Cowsay.www diff --git a/src/Cowsay.jl b/src/Cowsay.jl index 8cea75a..19c4d2b 100644 --- a/src/Cowsay.jl +++ b/src/Cowsay.jl @@ -15,6 +15,7 @@ include("cows/flaming-sheep.cow.jl") include("cows/fox.cow.jl") include("cows/kitty.cow.jl") include("cows/koala.cow.jl") +include("cows/mech-and-cow.cow.jl") include("cows/udder.cow.jl") include("cows/vader-koala.cow.jl") include("cows/vader.cow.jl") diff --git a/src/cows/mech-and-cow.cow.jl b/src/cows/mech-and-cow.cow.jl new file mode 100644 index 0000000..0f4717d --- /dev/null +++ b/src/cows/mech-and-cow.cow.jl @@ -0,0 +1,55 @@ +""" + function mech_and_cow() + +# Example + +```jldoctest +julia> cowsay("Do you ever get that feeling...?", cow=Cowsay.mech_and_cow) + __________________________________ +< Do you ever get that feeling...? > + ---------------------------------- + \\ ,-----. + / | | + \\ ,--| |-. + / __,----| | | | + \\ ,;:: | `_____' | + / `._______| i^i | + \\ `----| |---'| . + / ,-------._| |== ||// + \\ | |_|P`. /'/ + / `-------' 'Y Y/'/' + \\ .==\\ /_\\ + ^__^ / /'| `i + (oo)\\_______ /' / | | + (__)\\ )\\/\\ /' / | `i + ||----w|| ___,;`----'.___L_,-'`\\__ + || || i_____;----\\.____i""\\____\\ +``` +""" +function mech_and_cow(;eyes="oo", tongue=" ", thoughts="\\") +sthguoht = thoughts; +if thoughts == "\\" + sthguoht = "/" +end #if + +the_cow = +""" + $thoughts ,-----. + $sthguoht | | + $thoughts ,--| |-. + $sthguoht __,----| | | | + $thoughts ,;:: | `_____' | + $sthguoht `._______| i^i | + $thoughts `----| |---'| . + $sthguoht ,-------._| |== ||// + $thoughts | |_|P`. /'/ + $sthguoht `-------' 'Y Y/'/' + $thoughts .==\\ /_\\ + ^__^ / /'| `i + ($eyes)\\_______ /' / | | + (__)\\ )\\/\\ /' / | `i + $tongue||----w|| ___,;`----'.___L_,-'`\\__ + || || i_____;----\\.____i""\\____\\ +""" +return the_cow +end