Cowsay.jl
A Julia package that lets you use cowsay in your Julia programs!
Usage
Cowsay.cowsay
— Functioncowsay([io,] message::AbstractString; kwargs...)
cowthink([io,] message::AbstractString; kwargs...)
Print an ASCII picture of a cow saying/thinking message
Arguments
message::AbstractString
: Tell the cow what to say
Keywords
cow=default
: Specify a particular function handle to print the ASCII art. See below for more details on what constitutes a valid function handle.eyes::AbstractString="oo"
: A two-character string to be drawn in for the eyes. Not all cowfiles support this, though.tongue::AbstractString=" "
: A two-character string to be drawn in for the tongue. Not all cowfiles support this.wrap::Int=40
: The number of characters at which to wrapmessage
to a new linenowrap::Bool=false
: Don't perform text wrapping onmessage
Cow appearance Keywords
borg::Bool=false
: Initiates Borg modedead::Bool=false
: Causes the cow to appear deadgreedy::Bool=false
: Invokes greedy modeparanoid::Bool=false
: Causes a state of paranoia to come over the cowstoned::Bool=false
: Makes the cow appear thoroughly stonedtired::Bool=false
: Yields a tired cowwired::Bool=false
: Somewhat the opposite oftired
, and initiates wired modeyoung::Bool=false
: Brings on the cow's youthful appearance
Example
julia> cowsay("Have you mooed today?")
_______________________
< Have you mooed today? >
-----------------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
julia> cowthink("Have I mooed today?")
_____________________
( Have I mooed today? )
---------------------
o ^__^
o (oo)\_______
(__)\ )\/\
||----w |
|| ||
Cowsay.cowsaid
— Functioncowsaid(message::AbstractString; kwargs...)
cowthunk(message::AbstractString; kwargs...)
Constructs cow art and returns it as a string instead of printing it. See cowsay
for implementation details.
Example
julia> cowsaid("Have you mooed today?")
" _______________________\n< Have you mooed today? >\n -----------------------\n \\ ^__^\n \\ (oo)\\_______\n (__)\\ )\\/\\\n ||----w |\n || ||\n"
julia> cowthunk("Have I mooed today?")
" _____________________\n( Have I mooed today? )\n ---------------------\n o ^__^\n o (oo)\\_______\n (__)\\ )\\/\\\n ||----w |\n || ||\n"