Skip to content

Latest commit

 

History

History
49 lines (45 loc) · 1.04 KB

README.md

File metadata and controls

49 lines (45 loc) · 1.04 KB

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