GithubHelp home page GithubHelp logo

cowsay's Introduction

cowsay

Configurable talking cow for deno

GitHub code size in bytes GitHub GitHub last commit GitHub Workflow Status

 ________________
< Deno is Great! >
 ----------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||

Examples

import * as o from 'https://deno.land/x/cowsay/mod.ts'

let m = o.say({
    text: 'hello every one'
})
console.log(m)

Or you can trigger the cli:

deno run https://deno.land/x/cowsay/cowsay.ts -t="Hello world"

CLI arguments

arguments:
    --text       |   -t: Message Text [ex: --text="Hello world" ]
    --cow        |   -c: Cow image (default value is "cow") [ex: --cow="cat2" ]
    --mode       |   -m: Predefined eyes/tonges (from 1 to 8) [ex: --mode=3]
    --eyes       |   -e: Eyes of the image if exists (default: "oo") [ex: --eyes="@@" ]
    --tongue     |   -g: Tongue of the image (default: "U") [ex: --tongue="V" ]
    --random     |   -r: Pick random cow (default false) [ex: --random ]
    --think      |   -k: Use think insted of say (default false) [ex: --think ]
    --wrap       |   -w: Wrap the text (default false) [ex: --wrap ]
    --wrapLength | --wl: Where the message should be wrapped (default 40) [ex: --wrapLength=10 ]
    --list       | --ls: List the available cows

example:
    deno run https://deno.land/x/cowsay/cowsay.ts -t="Hello World" -r

Options

let m = o.say({
    text: 'hello',
    cow: 'cat', // Template for a cow (check the folder cows)
    eyes: 'oo', // Select the appearance of the cow's eyes, equivalent to cowsay -e
    tongue: 'U', // The tongue is configurable similarly to the eyes through -T and tongue_string, equivalent to cowsay -T
    wrap: false, // If it is specified, the given message will not be word-wrapped
    wrapLength: 40, // Specifies roughly where the message should be wrapped.
    mode: 1, // 1...9,
    random: false //Draw random cow
})
console.log(m)

Credits

cowsay is heavily inspired by cowsay with deno support.

License

MIT

cowsay's People

Contributors

fakoua avatar trgwii avatar

Watchers

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