https://github.com/fdesjardins/wikiquote-cli
Companion CLI for wikiquote package (https://github.com/fdesjardins/wikiquote)
https://github.com/fdesjardins/wikiquote-cli
cli excerpts fortunes proverbs quotes sayings wikiquote
Last synced: about 2 months ago
JSON representation
Companion CLI for wikiquote package (https://github.com/fdesjardins/wikiquote)
- Host: GitHub
- URL: https://github.com/fdesjardins/wikiquote-cli
- Owner: fdesjardins
- Created: 2017-03-26T19:25:02.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2022-12-30T17:14:10.000Z (over 2 years ago)
- Last Synced: 2024-04-14T22:12:50.231Z (about 1 year ago)
- Topics: cli, excerpts, fortunes, proverbs, quotes, sayings, wikiquote
- Language: JavaScript
- Homepage:
- Size: 2.24 MB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 12
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# wikiquote-cli
[![Build Status][travis-image]][travis-url]
[![NPM Version][npm-image]][npm-url]
[![Coverage][coveralls-image]][coveralls-url]Companion CLI for wikiquote package (https://github.com/fdesjardins/wikiquote)
## Install
```
$ npm install -g wikiquote-cli
```## Usage
```
$ wikiquote -hGet quotes from Wikiquote
Usage: wikiquote [options]
Commands:
wikiquote cache issue cache commands
wikiquote list list quotes for a page name
wikiquote random get a random quote from a page
wikiquote search search for page names
wikiquote completion generate bash completion scriptOptions:
-v, --version Show version number [boolean]
-h, --help Show help [boolean]Examples:
wikiquote random "Steve Jobs"
wikiquote search "bill gates"
```### Cache & Offline Usage
You can speed up quote retrieval and store quotes by using the `cache` command:
```
Commands:
wikiquote cache add cache quotes for a give page
wikiquote cache clear clear the local cache
wikiquote cache update update the local cache
```## Examples
Adding cache entries:
```sh
$ time wikiquote random 'Abraham Lincoln'
# 2.02s user 0.11s system 85% cpu 2.503 total$ wikiquote cache add 'Abraham Lincoln'
Added "Abraham Lincoln" to cache$ time wikiquote random 'Abraham Lincoln'
# 0.33s user 0.04s system 111% cpu 0.338 total
```Use with other programs:
```sh
$ wikiquote random "Nikola Tesla" | cowsay
_________________________________________
/ We crave for new sensations but soon \
| become indifferent to them. The wonders |
| of yesterday are today common |
\ occurrences. -- Nikola Tesla /
-----------------------------------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
```## License
MIT © [Forrest Desjardins](https://github.com/fdesjardins)
[npm-url]: https://www.npmjs.com/package/wikiquote-cli
[npm-image]: https://img.shields.io/npm/v/wikiquote-cli.svg?style=flat
[travis-url]: https://travis-ci.org/fdesjardins/wikiquote-cli
[travis-image]: https://img.shields.io/travis/fdesjardins/wikiquote-cli.svg?style=flat
[coveralls-url]: https://coveralls.io/r/fdesjardins/wikiquote-cli
[coveralls-image]: https://img.shields.io/coveralls/fdesjardins/wikiquote-cli.svg?style=flat