yodasay-extended
yodasay is a configurable talking Yoda
Last updated 3 years ago by braxtonc .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install yodasay-extended -g
SYNC missed versions from official npm registry.

yodasay

 ________________________
< Use yodasay, you will. >
 ------------------------
      \
       \
          .--.
  \`--._,'.::.`._.--'/
    .  ` __::__ '  .
      -:.`'..`'.:-
        \ `--' /
          ----

yodasay is a configurable talking yoda, originally written in Perl by Tony Monroe and then re-written in Node.js by Fabio Crisci.

This project is a fork of https://github.com/piuccio/cowsay. The Yoda ASCII art was taken from Christopher Johnson's website.

Install

npm install -g yodasay

Usage

yodasay JavaScript FTW!

or

yodathink Node.js is cool

It acts in the same way as cowsay, so consult yodasay(1) or run yodasay -h

 ________
< indeed >
 --------
       \
        \
                       .-.
                      |_:_|
                     /(_Y_)\
                    ( \/M\/ )
 '.               _.'-/'-'\-'._
   ':           _/.--'[[[[]'--.\_
     ':        /_'  : |::"| :  '.\
       ':     //   ./ |oUU| \.'  :\
         ':  _:'..' \_|___|_/ :   :|
           ':.  .'  |_[___]_|  :.':\
            [::\ |  :  | |  :   ; : \
             '-'   \/'.| |.' \  .;.' |
             |\_    \  '-'   :       |
             |  \    \ .:    :   |   |
             |   \    | '.   :    \  |
             /       \   :. .;       |
            /     |   |  :__/     :  \\
           |  |   |    \:   | \   |   ||
          /    \  : :  |:   /  |__|   /|
      snd |     : : :_/_|  /'._\  '--|_\
          /___.-/_|-'   \  \
                         '-'

Usage as a module

yodasay can be used as any other npm dependency

var yodasay = require('yodasay');

console.log(yodasay.say({
  text : 'Use yodasay, you will.'
}));

// or yodasay.think()

Pipe from standard input

echo please repeat | yodasay

Usage in the browser

yodasay works in your browser too with rollup / webpack / browserify / you name it.

import { say } from 'yodasay';

console.log(say({ text: 'meditating in the browser' }));

You can customize the character by importing the relevant one

import { think, R2D2 } from 'yodasay';

console.log(think({
  text: 'meditating in the browser',
  cow: R2D2,
  eyes: 'pp',
  tongue: ';;'
}));

All characters are included in the bundle, but you can use rollup / webpack tree-shake feature to reduce the final bundle size.

Browser options

say({
  text: 'hello',
  cow: '', // Template for a character, get inspiration from `./cows`
  eyes: 'oo', // Select the appearance of the character's eyes, equivalent to yodasay -e
  tongue: 'L|', // The tongue is configurable similarly to the eyes through -T and tongue_string, equivalent to yodasay -T
  wrap: false, // If it is specified, the given message will not be word-wrapped. equivalent to yodasay -n
  wrapLength: 40, // Specifies roughly where the message should be wrapped. equivalent to yodasay -W
  mode: 'b', // One of 	"b", "d", "g", "p", "s", "t", "w", "y"
});

Current Tags

  • 1.0.1                                ...           latest (3 years ago)

2 Versions

  • 1.0.1                                ...           3 years ago
  • 1.0.0                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 4
Dependencies (3)
Dev Dependencies (5)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |