diff --git a/dev/cowfiles/index.html b/dev/cowfiles/index.html index 4fc35c9..fe7c990 100644 --- a/dev/cowfiles/index.html +++ b/dev/cowfiles/index.html @@ -1,2 +1,2 @@ -Make your own Cowfile · cowsay.jl

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. When converting from Perl cowfiles, unescape at symbols (@), as these are not special in Julia strings
  6. Split the eyes variable to get individual left- and right-eye when creating large cow functions
  7. Have fun!
+Make your own Cowfile · cowsay.jl

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. When converting from Perl cowfiles, unescape at symbols (@), as these are not special in Julia strings
  6. Split the eyes variable to get individual left- and right-eye when creating large cow functions
  7. Have fun!
diff --git a/dev/cows/index.html b/dev/cows/index.html index 19ccc0a..71444da 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.moofasaFunction
function moofasa()

MOOfasa

Example

julia> cowsay("It's the circle of life", cow=Cowsay.moofasa)
+
source
Cowsay.moofasaFunction
function moofasa()

MOOfasa

Example

julia> cowsay("It's the circle of life", cow=Cowsay.moofasa)
  _________________________
 < It's the circle of life >
  -------------------------
@@ -34,14 +34,14 @@
            \____/|----w |
                 ||     ||
 
-             Moofasa
source
Cowsay.mutilatedFunction
function mutilated()

A mutilated cow, from aspolito@csua.berkeley.edu

Example

julia> cowsay("I wouldn't have been so eager to make head cheese...", cow=Cowsay.mutilated)
+             Moofasa
source
Cowsay.mutilatedFunction
function mutilated()

A mutilated cow, from aspolito@csua.berkeley.edu

Example

julia> cowsay("I wouldn't have been so eager to make head cheese...", cow=Cowsay.mutilated)
  ______________________________________________________
 < I wouldn't have been so eager to make head cheese... >
  ------------------------------------------------------
        \   \_______
  v__v   \  \   O   )
  (oo)      ||----w |
- (__)      ||     ||  \/\
source
Cowsay.skeletonFunction
function skeleton()

This 'Scowleton' brought to you by one of {appel,kube,rowe}@csua.berkeley.edu

Example

julia> cowsay("All T-Bone, no steak", cow=Cowsay.skeleton)
+ (__)      ||     ||  \/\
source
Cowsay.skeletonFunction
function skeleton()

This 'Scowleton' brought to you by one of {appel,kube,rowe}@csua.berkeley.edu

Example

julia> cowsay("All T-Bone, no steak", cow=Cowsay.skeleton)
  ______________________
 < All T-Bone, no steak >
  ----------------------
@@ -53,14 +53,14 @@
                    I`I'///'' I I
                    I I       I I
                    ~ ~       ~ ~
-                     Scowleton
source
Cowsay.smallFunction
function small()

A small cow, artist unknown

Example

julia> cowsay("A calf", cow=Cowsay.small)
+                     Scowleton
source
Cowsay.smallFunction
function small()

A small cow, artist unknown

Example

julia> cowsay("A calf", cow=Cowsay.small)
  ________
 < A calf >
  --------
        \   ,__,
         \  (..)____
            (__)    )\
-              ||--|| *
source
Cowsay.supermilkerFunction
function supermilker()

A cow being milked, probably from Lars Smith (lars@csua.berkeley.edu)

Example

julia> cowsay("Paying the bills", cow=Cowsay.supermilker)
+              ||--|| *
source
Cowsay.supermilkerFunction
function supermilker()

A cow being milked, probably from Lars Smith (lars@csua.berkeley.edu)

Example

julia> cowsay("Paying the bills", cow=Cowsay.supermilker)
  __________________
 < Paying the bills >
  ------------------
@@ -68,7 +68,7 @@
    \  (oo)\_______        ________
       (__)\       )\/\    |Super |
           ||----W |       |Milker|
-          ||    UDDDDDDDDD|______|
source
Cowsay.three_eyesFunction
function three_eyes()

A cow with three eyes, brought to you by dpetrou@csua.berkeley.edu

Example

julia> cowsay("The better to see you with...", cow=Cowsay.three_eyes)
+          ||    UDDDDDDDDD|______|
source
Cowsay.three_eyesFunction
function three_eyes()

A cow with three eyes, brought to you by dpetrou@csua.berkeley.edu

Example

julia> cowsay("The better to see you with...", cow=Cowsay.three_eyes)
  _______________________________
 < The better to see you with... >
  -------------------------------
@@ -76,7 +76,7 @@
          \ (ooo)\_______
            (___)\       )\/\
                 ||----w |
-                ||     ||
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! >
  ---------------
@@ -88,7 +88,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! >
  -------------------------
@@ -99,7 +99,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 >
  -----------------------------
@@ -107,7 +107,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 >
  --------------
@@ -136,7 +136,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! >
  -------
@@ -149,7 +149,7 @@
         |  | |  |
         |   o   |
         | |   | |
-        |m|   |m|
source
Cowsay.tuxFunction
function tux()

TuX (c) pborys@p-soft.silesia.linux.org.pl

Example

julia> cowsay("Talk is cheap. Show me the code.", cow=Cowsay.tux)
+        |m|   |m|
source
Cowsay.tuxFunction
function tux()

TuX (c) pborys@p-soft.silesia.linux.org.pl

Example

julia> cowsay("Talk is cheap. Show me the code.", cow=Cowsay.tux)
  __________________________________
 < Talk is cheap. Show me the code. >
  ----------------------------------
@@ -161,7 +161,7 @@
       //   \ \
      (|     | )
     /'\_   _/`\
-    \___)=(___/
source

Cows and friends

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

Cows and friends

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 >
  ------------------------------------
@@ -180,7 +180,7 @@
              \____(oo)           *.   }            {                   /
              (    (--)          .----~-.\        \-`                 .~
              //__\\  \__ Ack!   ///.----..<        \             _ -~
-            //    \\               ///-._ _ _ _ _ _ _{^ - - - - ~
source
Cowsay.mech_and_cowFunction
function mech_and_cow()

Example

julia> cowsay("Do you ever get that feeling...?", cow=Cowsay.mech_and_cow)
+            //    \\               ///-._ _ _ _ _ _ _{^ - - - - ~
source
Cowsay.mech_and_cowFunction
function mech_and_cow()

Example

julia> cowsay("Do you ever get that feeling...?", cow=Cowsay.mech_and_cow)
  __________________________________
 < Do you ever get that feeling...? >
  ----------------------------------
@@ -199,7 +199,7 @@
    (oo)\_______                   /'   /  |   |
    (__)\       )\/\            /'    /   |   `i
       ||----w||           ___,;`----'.___L_,-'`\__
-      ||     ||          i_____;----\.____i""\____\
source
Cowsay.surgeryFunction
function surgery()

A cow operation, artist unknown

Example

julia> cowsay("Removing the last bit of net wrap now", cow=Cowsay.surgery)
+      ||     ||          i_____;----\.____i""\____\
source
Cowsay.surgeryFunction
function surgery()

A cow operation, artist unknown

Example

julia> cowsay("Removing the last bit of net wrap now", cow=Cowsay.surgery)
  _______________________________________
 < Removing the last bit of net wrap now >
  ---------------------------------------
@@ -221,7 +221,7 @@
                  . .
                 '.'.`
 
-            COW-OPERATION
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)
+            COW-OPERATION
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. >
  ------------------------------------------------
@@ -230,7 +230,7 @@
         \ /\
         ( )
       .( o ).
-
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! >
  -------
@@ -250,7 +250,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! >
  -------
@@ -263,7 +263,7 @@
 ..............................
 
 Elephant inside ASCII snake
-
source
Cowsay.eyesFunction
function eyes()

Evil-looking eyes

Example

julia> cowsay("Mwah, ha, ha!", cow=Cowsay.eyes)
+
source
Cowsay.eyesFunction
function eyes()

Evil-looking eyes

Example

julia> cowsay("Mwah, ha, ha!", cow=Cowsay.eyes)
  _______________
 < Mwah, ha, ha! >
  ---------------
@@ -277,7 +277,7 @@ Elephant inside ASCII snake
       $$$$$  $$$UX   :!!UW$$$$$$$$$   4$$$$$*
       ^$$$B  $$$$\     $$$$$$$$$$$$   d$$R"
         "*$bd$$$$      '*$$$$$$$$$$$o+#"
-             """"          """""""
source
Cowsay.flaming_sheepFunction
function flaming_sheep()

The flaming sheep, contributed by Geordan Rosario (geordan@csua.berkeley.edu)

Example

julia> cowsay("Baaahhh!", cow=Cowsay.flaming_sheep)
+             """"          """""""
source
Cowsay.flaming_sheepFunction
function flaming_sheep()

The flaming sheep, contributed by Geordan Rosario (geordan@csua.berkeley.edu)

Example

julia> cowsay("Baaahhh!", cow=Cowsay.flaming_sheep)
  __________
 < Baaahhh! >
  ----------
@@ -290,7 +290,7 @@ Elephant inside ASCII snake
            \__/(@@@@@@@@@@)'
                 (@@@@@@@@)
                 `YY~~~~YY'
-                 ||    ||
source
Cowsay.foxFunction
function fox()

Example

julia> cowsay("What does the fox say?", cow=Cowsay.fox)
+                 ||    ||
source
Cowsay.foxFunction
function fox()

Example

julia> cowsay("What does the fox say?", cow=Cowsay.fox)
  ________________________
 < What does the fox say? >
  ------------------------
@@ -309,7 +309,7 @@ Elephant inside ASCII snake
                  | | |.;.,..__ |
                .-"";`         `|
               /    |           /
-              `-../____,..---'`
source
Cowsay.kittyFunction
function kitty()

A kitten of sorts, I think

Example

julia> cowsay("Meow", cow=Cowsay.kitty)
+              `-../____,..---'`
source
Cowsay.kittyFunction
function kitty()

A kitten of sorts, I think

Example

julia> cowsay("Meow", cow=Cowsay.kitty)
  ______
 < Meow >
  ------
@@ -319,7 +319,7 @@ Elephant inside ASCII snake
          ` *_ *  )    `-.   (      ) .`-.__. `)
          (_Y_.) ' ._   )   `._` ;  `` -. .-'
       _.. `--'_..-_/   /--' _ .' ,4
-   ( i l ),-''  ( l i),'  ( ( ! .-'
source
Cowsay.koalaFunction
function koala

From the canonical koala collection

Example

julia> cowsay("Welcome to Down Under", cow=Cowsay.koala)
+   ( i l ),-''  ( l i),'  ( ( ! .-'
source
Cowsay.koalaFunction
function koala

From the canonical koala collection

Example

julia> cowsay("Welcome to Down Under", cow=Cowsay.koala)
  _______________________
 < Welcome to Down Under >
  -----------------------
@@ -329,7 +329,7 @@ Elephant inside ASCII snake
      {~._.~}
       ( Y )
      ()~*~()
-     (_)-(_)
source
Cowsay.meowFunction
function meow()

A meowing tiger?

Example

julia> cowsay("We're kind of stupid that way", cow=Cowsay.meow)
+     (_)-(_)
source
Cowsay.meowFunction
function meow()

A meowing tiger?

Example

julia> cowsay("We're kind of stupid that way", cow=Cowsay.meow)
  _______________________________
 < We're kind of stupid that way >
  -------------------------------
@@ -342,7 +342,7 @@ Elephant inside ASCII snake
    `-'``/  /  |  // \__/\__  /  \__/ \
         `-'  /-\/  | -|   \__ \   |-' |
           __/\ / _/ \/ __,-'   ) ,' _|'
-         (((__/(((_.' ((___..-'((__,'
source
Cowsay.mooseFunction
function moose()

Example

julia> cowsay("Time to vamoose", cow=Cowsay.moose)
+         (((__/(((_.' ((___..-'((__,'
source
Cowsay.mooseFunction
function moose()

Example

julia> cowsay("Time to vamoose", cow=Cowsay.moose)
  _________________
 < Time to vamoose >
  -----------------
@@ -352,7 +352,7 @@ Elephant inside ASCII snake
            (oo)\_______
            (__)\       )\/\
                ||----w |
-               ||     ||
source
Cowsay.sheepFunction
function sheep()

The non-flaming sheep.

Example

julia> cowsay("Baa", cow=Cowsay.sheep)
+               ||     ||
source
Cowsay.sheepFunction
function sheep()

The non-flaming sheep.

Example

julia> cowsay("Baa", cow=Cowsay.sheep)
  _____
 < Baa >
  -----
@@ -363,7 +363,7 @@ Elephant inside ASCII snake
       \__/(@@@@@@@@@@)
            (@@@@@@@@)
            `YY~~~~YY'
-            ||    ||
source
Cowsay.stegosaurusFunction
function stegosaurus()

A stegosaur with a top hat?

Example

julia> cowsay("How do you do?", cow=Cowsay.stegosaurus)
+            ||    ||
source
Cowsay.stegosaurusFunction
function stegosaurus()

A stegosaur with a top hat?

Example

julia> cowsay("How do you do?", cow=Cowsay.stegosaurus)
  ________________
 < How do you do? >
  ----------------
@@ -380,7 +380,7 @@ Elephant inside ASCII snake
             `-.      |       /      |       /      `. ,~~|
                 ~-.__|      /_ - ~ ^|      /- _      `..-'
                      |     /        |     /     ~-.     `-. _  _  _
-                     |_____|        |_____|         ~ - . _ _ _ _ _>
source
Cowsay.turkeyFunction
function turkey()

Turkey!

Example

julia> cowsay("Gobble, gobble", cow=Cowsay.turkey)
+                     |_____|        |_____|         ~ - . _ _ _ _ _>
source
Cowsay.turkeyFunction
function turkey()

Turkey!

Example

julia> cowsay("Gobble, gobble", cow=Cowsay.turkey)
  ________________
 < Gobble, gobble >
  ----------------
@@ -404,7 +404,7 @@ Elephant inside ASCII snake
                   ^^^^^\uuu/^^\uuu/^^^^\^\^\^\^\^\^\^\
                      ___) >____) >___   ^\_\_\_\_\_\_\)
                     ^^^//\\_^^//\\_^       ^(\_\_\_\)
-                      ^^^ ^^ ^^^ ^
source
Cowsay.turtleFunction
function turtle()

A mysterious turtle...

Example

julia> cowsay("Where is that pesky rabbit?", cow=Cowsay.turtle)
+                      ^^^ ^^ ^^^ ^
source
Cowsay.turtleFunction
function turtle()

A mysterious turtle...

Example

julia> cowsay("Where is that pesky rabbit?", cow=Cowsay.turtle)
  _____________________________
 < Where is that pesky rabbit? >
  -----------------------------
@@ -422,7 +422,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! >
  ------------------------
@@ -436,4 +436,4 @@ Elephant inside ASCII snake
 
      Darth
      Vader
-     koala
source
+ koalasource diff --git a/dev/index.html b/dev/index.html index 3f5def3..662f7f7 100644 --- a/dev/index.html +++ b/dev/index.html @@ -18,4 +18,4 @@ julia> cowthink("Have I mooed today?") o (oo)\_______ (__)\ )\/\ ||----w | - || ||source + || ||source diff --git a/dev/search/index.html b/dev/search/index.html index f4924de..a8cdc66 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...