owl-wisdom

2.0.0 • Public • Published

owl-wisdom

A wise owl spouts quotes to your terminal, inspired by cowsay 📚

About

After making an ASCII owl, the desire came to let it inspire me. The module builds a quote database by fetching the BrainyQuotes quotes of the day once a day, any day you ask the owl for some wisdom. It adds those quotes to the database and chooses a random quote with which to learn you.

Inspired and powered by cowsay. Quote fetching is a rewrite of quoter.

Install

$ npm install -g owl-wisdom

Use

$ owl-wisdom

owl

Get inspired every time you open your terminal by putting it in your .bashrc:

echo owl-wisdom >> ~/.bashrc

Besides the owl, all the creatures of cowsay are available, or you can add a path to your own cow file:

# your own cowfile 
$ owl-wisdom path/to/file.cow
 
# or an included cowsay file: 
$ owl-wisdom stegosaurus

stegosaurus

More

$ owl-wisdom -h

Usage: owl-wisdom [cowFile]

cowFile         An optional cowfile name or path to cow file for non-owl insight

--limit [int]   Get or set the maximum number of quotes to keep in the database,
                default 100

--count         Find out how many quotes are in your database

--update        Force a quote database update.

--where         Owl tells you the location of quote database

More help:
 -h, --help     Let's not insult your intelligence here...
 -l             List included cow files

The Quote Database

The database is saved as .quoteDb.json in your home directory. Here's what it looks like so you could link in and add your own quotes if so desired. It is simply a JSON file:

{
  ids: ['42'],                // used to ensure the same quote isn't added multiple times
  quotes: [                   // an array of objects that contain a quote and author
    {
      quote: 'We are ways for the Cosmos to know itself.',
      author: 'Carl Sagan'
    }
  ],
  lastUpdate: '2016-12-16',   // recorded so it only updates once a day
  limit: 100                  // the maximum quotes to store in the database.
}

License

MIT © 2016 Robert Pirtle

Package Sidebar

Install

npm i owl-wisdom

Weekly Downloads

5

Version

2.0.0

License

MIT

Unpacked Size

53.9 kB

Total Files

14

Last publish

Collaborators

  • pirtleshell