A C implementation of cowsay. I wanted to write something fun while learning C, and cowsay seemed like a good excuse to mess with text processing and file I/O. It's not trying to replace the original.
- Text wrapping (configurable width)
- Speech and thought bubbles (cowsay/cowthink)
- Custom eyes and tongue
- Personality modes (borg, dead, greedy, paranoid, stoned, tired, wired, young)
- COWPATH support
- Reads from stdin or args
git clone https://github.com/xstread/ccowsay.git
cd ccowsay
make
sudo make installInstalls to /usr/bin, cow files to /usr/local/share/ccowsay/cows.
Uninstall:
sudo make uninstallccowsay [options] [message]If you don't give it a message, it reads from stdin.
-f cowfile Pick a cow (default: default)
-W width Wrap width (default: 40)
-e eyes Custom eyes (2 chars, default: oo)
-T tongue Custom tongue (2 chars)
-n No wrapping
-l List cows
-h Help
-b Borg (eyes: ==)
-d Dead (eyes: xx, tongue: U )
-g Greedy (eyes: $$)
-p Paranoid (eyes: @@)
-s Stoned (eyes: **, tongue: U )
-t Tired (eyes: --)
-w Wired (eyes: OO)
-y Young (eyes: ..)
ccowsay "Hello, World!"
ccowsay -f dragon "I am a dragon"
fortune | ccowsay
cowthink "Hmm, interesting..."
cowthink "How cursed are companies today? Age verification??"
ccowsay -d -W 60 "I'm not feeling so good"
ccowsay -lCow files use three placeholders:
{{eyes}}- Eye characters{{tongue}}- Tongue characters{{thoughts}}-\for speech,ofor thoughts
Add custom cows to:
./cows/(local)/usr/local/share/ccowsay/cows/(system)- Any path in
COWPATH(colon separated)
export COWPATH="/path/to/custom/cows:/another/path"See LICENSE file.