Cowsay, written in ruby, packaged as a gem.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib Version 0.1.2 Aug 2, 2016
tests Setting up the gem to be able to run tests. Jan 11, 2010
.gitignore Updated gitignore. Feb 10, 2013
Gemfile Converted gemspec management over to bundler. Feb 10, 2013
Gemfile.lock Converted gemspec management over to bundler. Feb 10, 2013
Manifest Setting up the gem to be able to run tests. Jan 11, 2010
README.mdown Fixed a typo in the README's extension. Jan 7, 2010
Rakefile Fixed some capitalization errors. Jan 7, 2010
ruby_cowsay.gemspec

README.mdown

Cowsay (In Ruby)

 ___________ 
< OMGHI2U!! >
 ----------- 
      \   ^__^
       \  (oo)\_______
          (__)\       )\/\
              ||----w |
              ||     ||

What is this?

Cowsay on the command line is awesome. You can pipe stuff to it and it displays your message in a spectacular bovine fashion. What about when you want to use it in your log file or within a ruby application? Not so easy.

Until Now...

Using ruby_cowsay is easy. Here's some examples:

Simplest:

puts Cow.new.say('Mooooooooo!!!')
 _______________ 
< Mooooooooo!!! >
 --------------- 
      \   ^__^
       \  (oo)\_______
          (__)\       )\/\
              ||----w |
              ||     ||

Default Cow, Special Face

cow = Cow.new({ :face_type => 'paranoid'})
puts cow.say("Eveyone is staring at me!!!")
 _____________________________ 
< Eveyone is staring at me!!! >
 ----------------------------- 
      \   ^__^
       \  (@@)\_______
          (__)\       )\/\
              ||----w |
              ||     ||

Using a Special Cow and a thinking bubble

steg = Cow.new({ :cow => 'stegosaurus' })
puts steg.say("My hat is so rad.", 'think')
 ___________________ 
( My hat is so rad. )
 ------------------- 
o                             .       .
 o                           / `.   .' " 
  o                  .---.  <    > <    >  .---.
   o                 |    \  \ - ~ ~ - /  /    |
         _____          ..-~             ~-..-~
        |     |   \~~~\.'                    `./~~~/
       ---------   \__/                        \__/
      .'  O    \     /               /       \  " 
     (_____,    `._.'               |         }  \/~~~/
      `----.          /       }     |        /    \__/
            `-.      |       /      |       /      `. ,~~|
                ~-.__|      /_ - ~ ^|      /- _      `..-'   
                     |     /        |     /     ~-.     `-. _  _  _
                     |_____|        |_____|         ~ - . _ _ _ _ _>

Why Would I Use This?

Use it for whatever you want. I think it's nice for visually finding stuff you've injected into log files, dumping out console messages to users, or generally having fun.

Bugs

I'm sure there's bugs. I had to do things significantly different than the original implementation in order to achieve my goals here. If there's something you think I did poorly, by all means, fork, fix, and submit a pull request.

Special Thanks

I'd like to thank Tony Monroe for the original perl CLI implementation. You can find out more about that here:

http://www.nog.net/~tony/warez/cowsay.shtml