🐄 cowsay for Julia!
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Go to file
Thomas A. Christensen II 825c66365a
Add tests for cow modes
Signed-off-by: Thomas A. Christensen II <25492070+MillironX@users.noreply.github.com>
2 years ago
.github/workflows Add latest stable Julia version to CI testing 2 years ago
docs Add `cowsaid` to the docs 2 years ago
src Add support for cow "modes" 2 years ago
test Add tests for cow modes 2 years ago
.gitignore Files generated by PkgTemplates 3 years ago
CHANGELOG.md Version bump to v0.3.1 2 years ago
LICENSE Files generated by PkgTemplates 3 years ago
Project.toml Version bump to v0.3.1 2 years ago
README.md Remove text wrapping reference from README 2 years ago

README.md

Cowsay.jl

 ___________________
< Cowsay for Juila! >
 -------------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||

Stable Dev Build Status Coverage

A talking cow library for Julia, based on the Fedora release of cowsay.

Installation

You can install straight from the Julia REPL. Press ] to enter pkg mode, then:

add Cowsay

Usage

Complete usage info can be found in the documentation. Cowsay.jl exports two functions: cowsay and cowthink, which print an ASCII cow saying or thinking a message, respectively.

julia> using Cowsay
julia> cowsay("Bessie the heifer\nthe queen of all the cows.")
 ____________________________
/ Bessie the heifer:         \
\ the queen of all the cows. /
 ----------------------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||

julia> cowthink("The farmers who have no livestock,\ntheir lives simply aren't the best")
 ____________________________________
( The farmers who have no livestock, )
( their lives simply aren't the best )
 ------------------------------------
        o   ^__^
         o  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||

If you want to use talking cows in your program, use the cowsaid and cowthunk functions to get strings of the cow art.

julia> @info string("\n", cowsaid("And the longhorns lowed him a welcome\nAs a new voice cried from the buckboard"))
┌ Info:
│  _________________________________________
│ / And the longhorns lowed him a welcome   \
│ \ As a new voice cried from the buckboard /
│  -----------------------------------------
│         \   ^__^
│          \  (oo)\_______
│             (__)\       )\/\
│                 ||----w |
└                 ||     ||

There are also plenty of unexported Cowfiles that you can use to customize your art.

julia> cowsay("This heifer must be empty\n'Cuz she ain't puttin' out", cow=Cowsay.udder)
 ____________________________
/ This heifer must be empty  \
\ 'Cuz she ain't puttin' out /
 ----------------------------
  \
   \    (__)
        o o\
       ('') \---------
          \           \
           |          |\
           ||---(  )_|| *
           ||    UU  ||
           ==        ==

You can also change the eyeballs and tongue of your cow.

julia> cowsay("You better watch your step\nwhen you know the chips are down!", tongue=" U", eyes="00")
 ___________________________________
/ You better watch your step        \
\ when you know the chips are down! /
 -----------------------------------
        \   ^__^
         \  (00)\_______
            (__)\       )\/\
              U ||----w |
                ||     ||