🐄 cowsay for Julia!
Find a file
Thomas A. Christensen II d28164f057
All checks were successful
ci/woodpecker/push/ci/1 Pipeline was successful
ci/woodpecker/push/ci/2 Pipeline was successful
ci/woodpecker/push/ci/3 Pipeline was successful
ci/woodpecker/push/ci/4 Pipeline was successful
ci/woodpecker/push/ci/5 Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
ci: Change docs path
2024-12-17 00:08:16 -06:00
.woodpecker ci: Make Woodpecker more modern 2024-12-16 23:28:10 -06:00
docs ci: Change docs path 2024-12-17 00:08:16 -06:00
src Add Prettier formatting to README 2022-05-10 19:57:40 -05:00
test Add tests for cow modes 2022-05-10 19:46:40 -05:00
.gitignore Files generated by PkgTemplates 2021-09-15 17:51:11 -05:00
CHANGELOG.md Update CHANGELOG 2022-05-10 19:47:17 -05:00
LICENSE Files generated by PkgTemplates 2021-09-15 17:51:11 -05:00
Project.toml ci: Make Woodpecker more modern 2024-12-16 23:28:10 -06:00
README.md Add Genie download badge to README 2022-05-10 20:04:41 -05:00

Cowsay.jl

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

Stable Dev Build Status Coverage Genie Downloads

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 |
                ||     ||

And even change its emotional or physical state using modes.

julia> cowsay("He mooed we must fight\nEscape or we'll die\nCows gathered around\n'Cause the steaks were so high"; dead=true)
 ________________________________
/ He mooed we must fight         \
| Escape or we'll die            |
| Cows gathered around           |
\ 'Cause the steaks were so high /
 --------------------------------
        \   ^__^
         \  (xx)\_______
            (__)\       )\/\
             U  ||----w |
                ||     ||

Contributing

If you find a bug in Cowsay.jl, please file an issue. I will not be accepting any requests for new cowfiles in this repo, though.