Giter Club home page Giter Club logo

cowfiles's Introduction

cowfiles

Additional ASCII cowfiles for cowsay.

Installation

First, download and install cowsay.

  • OSX: brew install cowsay
  • GNU/Linux:
    • Debian based distros (Ubuntu): sudo apt-get install cowsay
    • Arch based distros: pacman -S cowsay
    • RHEL/CentOS based distros: dnf install cowsay
    • OpenSUSE: zypper install cowsay

Next, you need to place the cowfiles somewhere that cowsay can locate them. I recommend creating a .cowsay folder under your home directory. Clone the contents of this repo in that folder:

git clone https://github.com/bkendzior/cowfiles.git ~/.cowsay

Now, add the new folder to your $COWPATH environment variable. Append this line to your shell's configuration file (.bashrc, .zshrc, .cshrc).

COWPATH="$COWPATH:$HOME/.cowsay/cowfiles"

As MOTD

If you have fortune installed, here is a simple bash function that you can place in your shell's appropriate dotfile (bashrc, zshrc, cshrc) that will give you a useful quip from a funky cow whenever you open a new terminal session.

# Cow-spoken fortunes every time you open a terminal
function cowsayfortune {
    NUMOFCOWS=`cowsay -l | tail -n +2 | wc -w`
    WHICHCOW=$((RANDOM%$NUMOFCOWS+1))
    THISCOW=`cowsay -l | tail -n +2 | sed -e 's/\ /\'$'\n/g' | sed $WHICHCOW'q;d'`

    #echo "Selected cow: ${THISCOW}, from ${WHICHCOW}"
    fortune | cowsay -f $THISCOW -W 100
}

cowsayfortune

Preview all cowfiles

find ./cowfiles -name '*.cow' -exec sh -c 'cowsay -f $0 "hello,$(basename -s .cow $0)"' {} \;

cowfiles's People

Contributors

bkendzior avatar erikboesen avatar iolo avatar odisseus avatar randomdude999 avatar ricksbrown avatar sid3xyz avatar stefan-matic avatar terdon avatar tom-lord avatar vivian-dai avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.