diff --git a/dev/cows/index.html b/dev/cows/index.html index 6e3a8e3..1e0d262 100644 --- a/dev/cows/index.html +++ b/dev/cows/index.html @@ -9,7 +9,7 @@ ||----w | || || -source
Cowsay.cowerFunction
function cower()

A cowering cow

Example

julia> cowsay("Is it safe to come out yet?", cow=Cowsay.cower)
+
source
Cowsay.cowerFunction
function cower()

A cowering cow

Example

julia> cowsay("Is it safe to come out yet?", cow=Cowsay.cower)
  _____________________________
 < Is it safe to come out yet? >
  -----------------------------
@@ -22,7 +22,7 @@
              |    |  ||   *
 
              Cower....
-
source
Cowsay.udderFunction
function udder()

The cow from a file called cow-n-horn, artist unknown.

Example

julia> cowsay("Milking time!", cow=Cowsay.udder)
+
source
Cowsay.udderFunction
function udder()

The cow from a file called cow-n-horn, artist unknown.

Example

julia> cowsay("Milking time!", cow=Cowsay.udder)
  _______________
 < Milking time! >
  ---------------
@@ -34,7 +34,7 @@
            |          |\
            ||---(  )_|| *
            ||    UU  ||
-           ==        ==
source
Cowsay.vaderFunction
function vader()

Cowth Vader, from geordan@csua.berkeley.edu

Example

julia> cowsay("Luke, I am your father!", cow=Cowsay.vader)
+           ==        ==
source
Cowsay.vaderFunction
function vader()

Cowth Vader, from geordan@csua.berkeley.edu

Example

julia> cowsay("Luke, I am your father!", cow=Cowsay.vader)
  _________________________
 < Luke, I am your father! >
  -------------------------
@@ -45,7 +45,7 @@
                 ||-----w||
                 ||      ||
 
-               Cowth Vader
source
Cowsay.wwwFunction
function www()

A cow wadvertising the World Wide Web, from lim@csua.berkeley.edu

Example

julia> cowsay("My favorite site is MooTube", cow=Cowsay.www)
+               Cowth Vader
source
Cowsay.wwwFunction
function www()

A cow wadvertising the World Wide Web, from lim@csua.berkeley.edu

Example

julia> cowsay("My favorite site is MooTube", cow=Cowsay.www)
  _____________________________
 < My favorite site is MooTube >
  -----------------------------
@@ -53,7 +53,7 @@
          \  (oo)\_______
             (__)\       )\/\
                 ||--WWW |
-                ||     ||
source

Mascots

Cowsay.blowfishFunction
function blowfish()

A blowfish.

julia> cowsay("Bloop, bloop", cow=Cowsay.blowfish)
+                ||     ||
source

Mascots

Cowsay.blowfishFunction
function blowfish()

A blowfish.

julia> cowsay("Bloop, bloop", cow=Cowsay.blowfish)
  ______________
 < Bloop, bloop >
  --------------
@@ -82,7 +82,7 @@
         `.\
 
 
-
source
Cowsay.elephantFunction
function elephant()

An elephant out and about

Example

julia> cowsay("Toot!", cow=Cowsay.elephant)
+
source
Cowsay.elephantFunction
function elephant()

An elephant out and about

Example

julia> cowsay("Toot!", cow=Cowsay.elephant)
  _______
 < Toot! >
  -------
@@ -95,7 +95,7 @@
         |  | |  |
         |   o   |
         | |   | |
-        |m|   |m|
source

Other

Cowsay.bunnyFunction
function bunny()

A cute little wabbit

Example

julia> cowsay("Look at that tortoise way off in the distance.", cow=Cowsay.bunny)
+        |m|   |m|
source

Other

Cowsay.bunnyFunction
function bunny()

A cute little wabbit

Example

julia> cowsay("Look at that tortoise way off in the distance.", cow=Cowsay.bunny)
  ________________________________________________
 < Look at that tortoise way off in the distance. >
  ------------------------------------------------
@@ -104,7 +104,7 @@
         \ /\
         ( )
       .( o ).
-
source
Cowsay.dragon_and_cowFunction
function dragon_and_cow()

A dragon smiting a cow, possible credit to kube@csua.berkeley.edu

Example

julia> cowsay("Roast beef: it's what's for dinner", cow=Cowsay.dragon_and_cow)
+
source
Cowsay.dragon_and_cowFunction
function dragon_and_cow()

A dragon smiting a cow, possible credit to kube@csua.berkeley.edu

Example

julia> cowsay("Roast beef: it's what's for dinner", cow=Cowsay.dragon_and_cow)
  ____________________________________
 < Roast beef: it's what's for dinner >
  ------------------------------------
@@ -123,7 +123,7 @@
              \____(oo)           *.   }            {                   /
              (    (--)          .----~-.\        \-`                 .~
              //__\\  \__ Ack!   ///.----..<        \             _ -~
-            //    \\               ///-._ _ _ _ _ _ _{^ - - - - ~
source
Cowsay.dragonFunction
function dragon()

The Whitespace Dragon

Example

julia> cowsay("Roar!", cow=Cowsay.dragon)
+            //    \\               ///-._ _ _ _ _ _ _{^ - - - - ~
source
Cowsay.dragonFunction
function dragon()

The Whitespace Dragon

Example

julia> cowsay("Roar!", cow=Cowsay.dragon)
  _______
 < Roar! >
  -------
@@ -143,7 +143,7 @@
              ///.----..>        \             _ -~             `.  ^-`  ^-_
                ///-._ _ _ _ _ _ _}^ - - - - ~                     ~-- ,.-~
                                                                   /.-~
-
source
Cowsay.elephant_in_snakeFunction
function elephant_in_snake()

Do we need to explain this?

Example

julia> cowsay("Help!", cow=Cowsay.elephant_in_snake)
+
source
Cowsay.elephant_in_snakeFunction
function elephant_in_snake()

Do we need to explain this?

Example

julia> cowsay("Help!", cow=Cowsay.elephant_in_snake)
  _______
 < Help! >
  -------
@@ -156,7 +156,7 @@
 ..............................
 
 Elephant inside ASCII snake
-
source
Cowsay.vader_koalaFunction
function vader_koala

Another canonical koala?

Example

julia> cowsay("Luke, you are my joey!", cow=Cowsay.vader_koala)
+
source
Cowsay.vader_koalaFunction
function vader_koala

Another canonical koala?

Example

julia> cowsay("Luke, you are my joey!", cow=Cowsay.vader_koala)
  ________________________
 < Luke, you are my joey! >
  ------------------------
@@ -170,4 +170,4 @@ Elephant inside ASCII snake
 
      Darth
      Vader
-     koala
source
+ koalasource diff --git a/dev/index.html b/dev/index.html index 386967c..ac2a0c7 100644 --- a/dev/index.html +++ b/dev/index.html @@ -1,2 +1,2 @@ -Home · cowsay.jl

Cowsay.jl

A Julia package that lets you use cowsay in your Julia programs!

Usage

Cowsay.cowsayFunction
cowsay(message::AbstractString; kwargs...)

Print an ASCII picture of a cow saying 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.

Making a cow function

The original cowsay used Perl scripts (called 'cowfiles') to allow for creating more ASCII cow art. Cowsay.jl uses Julia functions, instead. In order to be usable by Cowsay.cowsay, a cow function must

  1. Take the correct arguments

    The function must take three (3) keyword arguments of the form

    • eyes::AbstractString="oo"
    • tongue::AbstractString=" "
    • thoughts::AbstractString="\"

    When drawing the cow artwork, you may then use the variables eyes in place of the eyes, tongue in place of the tongue, and thoughts in place of the speech ballon trail. Use of these variables in constructing the cow is optional (but makes the use of your cow function far more fun), but all three arguments must be present in the signature, regardless.

  2. Return a string

    The cow artwork must be returned from the function as a string. This is distinctly different from how the original cowsay modified the $the_cow variable.

Helpful hints for making cow functions

  1. Include one function per file, with the extension .cow.jl
  2. Do not indent within a .cow.jl file to better see the artwork
  3. Make use of string literals (""") and string interpolation ($) to build the cow art
  4. Be sure to escape backslashes (\) and dollar signs ($) within your artwork
  5. Split the eyes variable to get individual left- and right-eye when creating large cow functions
  6. Have fun!
source
+Home · cowsay.jl

Cowsay.jl

A Julia package that lets you use cowsay in your Julia programs!

Usage

Cowsay.cowsayFunction
cowsay(message::AbstractString; kwargs...)

Print an ASCII picture of a cow saying 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.

Making a cow function

The original cowsay used Perl scripts (called 'cowfiles') to allow for creating more ASCII cow art. Cowsay.jl uses Julia functions, instead. In order to be usable by Cowsay.cowsay, a cow function must

  1. Take the correct arguments

    The function must take three (3) keyword arguments of the form

    • eyes::AbstractString="oo"
    • tongue::AbstractString=" "
    • thoughts::AbstractString="\"

    When drawing the cow artwork, you may then use the variables eyes in place of the eyes, tongue in place of the tongue, and thoughts in place of the speech ballon trail. Use of these variables in constructing the cow is optional (but makes the use of your cow function far more fun), but all three arguments must be present in the signature, regardless.

  2. Return a string

    The cow artwork must be returned from the function as a string. This is distinctly different from how the original cowsay modified the $the_cow variable.

Helpful hints for making cow functions

  1. Include one function per file, with the extension .cow.jl
  2. Do not indent within a .cow.jl file to better see the artwork
  3. Make use of string literals (""") and string interpolation ($) to build the cow art
  4. Be sure to escape backslashes (\) and dollar signs ($) within your artwork
  5. Split the eyes variable to get individual left- and right-eye when creating large cow functions
  6. Have fun!
source
diff --git a/dev/search/index.html b/dev/search/index.html index f439d19..262c46a 100644 --- a/dev/search/index.html +++ b/dev/search/index.html @@ -1,2 +1,2 @@ -Search · cowsay.jl

Loading search...

    +Search · cowsay.jl

    Loading search...