Skip to content

randomhajile/cowsay-nim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cowsay

Tony Monroe's cowsay implemented in Nim.

Usage

CLI

$ cowsay -h
Usage:
  main [optional-params] [message: string...]
Cow says things.
Options:
  -h, --help                             print this cligen-erated help
  --help-syntax                          advanced: prepend,plurals,..
  -e=, --eyes=    string  "oo"           set eyes
  -f=, --file=    string  "default.cow"  set file
  -t=, --tongue=  string  "  "           set tongue
  -w=, --wrap=    int     39             set wrap

CLI Example

$ cowsay nim
 _____
< nim >
 -----
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||

Package Example

Add cowsay to your .nimble file, then you can import it as follows.

import cowsaypkg/cowsay

when isMainModule:
  let c = Cow(
      think: false,
      message: "Hello, world!",
      eyes: "oo",
      tongue: "  ",
      wrap: 39,
      file: "stegosaurus.cow"
  )
  echo c.say()

About

Cowsay implemented in Nim.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages