diff --git a/dev/cowfiles/index.html b/dev/cowfiles/index.html index d767611..42a28f6 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 d5bc15b..2f040fa 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,7 +34,7 @@
            \____/|----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...                        /
@@ -42,7 +42,7 @@
        \   \_______
  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 >
  ----------------------
@@ -54,14 +54,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 >
  ------------------
@@ -69,7 +69,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... >
  -------------------------------
@@ -77,7 +77,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! >
  ---------------
@@ -89,7 +89,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! >
  -------------------------
@@ -100,7 +100,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 >
  -----------------------------
@@ -108,7 +108,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 >
  --------------
@@ -137,7 +137,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! >
  -------
@@ -150,7 +150,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. >
  ----------------------------------
@@ -162,7 +162,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 >
  ------------------------------------
@@ -181,7 +181,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...? >
  ----------------------------------
@@ -200,7 +200,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 >
  ---------------------------------------
@@ -222,7 +222,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.                            /
@@ -232,7 +232,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! >
  -------
@@ -252,7 +252,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! >
  -------
@@ -265,7 +265,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! >
  ---------------
@@ -279,7 +279,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! >
  ----------
@@ -292,7 +292,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? >
  ------------------------
@@ -311,7 +311,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 >
  ------
@@ -321,7 +321,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 >
  -----------------------
@@ -331,7 +331,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 >
  -------------------------------
@@ -344,7 +344,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 >
  -----------------
@@ -354,7 +354,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 >
  -----
@@ -365,7 +365,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? >
  ----------------
@@ -382,7 +382,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 >
  ----------------
@@ -406,7 +406,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? >
  -----------------------------
@@ -424,7 +424,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! >
  ------------------------
@@ -438,4 +438,4 @@ Elephant inside ASCII snake
 
      Darth
      Vader
-     koala
source
+ koalasource diff --git a/dev/index.html b/dev/index.html index b1b87cf..da8af26 100644 --- a/dev/index.html +++ b/dev/index.html @@ -18,7 +18,7 @@ julia> cowthink("Have I mooed today?") o (oo)\_______ (__)\ )\/\ ||----w | - || ||source
Cowsay.cowsaidFunction
cowsaid(message::AbstractString; kwargs...)
+                ||     ||
source
Cowsay.cowsaidFunction
cowsaid(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"
source
+" _____________________\n( Have I mooed today? )\n ---------------------\n o ^__^\n o (oo)\\_______\n (__)\\ )\\/\\\n ||----w |\n || ||\n"source diff --git a/dev/search/index.html b/dev/search/index.html index c15fcb9..7e5c3da 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...