terminal-quotes
v1.0.5
Published
Fresh custom quotes in your terminal
Downloads
16
Maintainers
Readme
🌟 Terminal Quotes 🌟
Fresh custom quotes in your terminal
Install
$ npm install -g terminal-quotes
Usage
$ terminal-quotes [OPTIONS]
or$ node <path/to/terminal-quotes/cli.js> [OPTIONS]
Example
Output a random quote from programming-quotes-json
$ terminal-quotes
🌟 Terminal Quotes 🌟
"Software is like sex: it's better when it's free."
--Linus Torvalds
$Options
--total, -t Total quotes to print, defaults 1$ quotes is an alias of $ terminal-quotes
Show some quotes when open your terminal
- Edit your
bashrcfile$ nano ~/.bashrc - At the end of the file add:
terminal-quotes
ornode <path/to/terminal-quotes/cli.js>
Use with custom quotes
Just update in the package.json the config property like this:
...
"config": {
"source": "http://url.com/myAwesomeQuotes/array.json",
"quoteTextProp": "quote",
"authorTextProp": "author"
},
...where array.json looks like
[
{
"quote": "Life is awesome!",
"author": "unknow",
"source": "https://twitter.com/juliomatcom"
},
...
]terminal-quotes will fetch the .json of quotes and for every quotes print
quoteTextProp value as the quote itself and authorTextProp value as the author.
Note: terminal-quotes not support redirection, make sure the source URL returns a response 2xx and not a redirect.
License
MIT © Julio Cesar Martin
