npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

quotes-cli

v1.1.0

Published

Generates random quotes

Downloads

90

Readme

quotes-cli

Version License

quotes-cli is a Node.js command-line tool that generates random quotes directly from Goodreads. Fetch random quotes, quotes by tag, search for quotes by author or book, or retrieve multiple quotes at once.

Features

  • Random Quotes: Get a random quote.
  • Quotes by Tag: Fetch a random quote from a specific tag.
  • Search Quotes: Find quotes by author or book.
  • Bulk Quotes: Retrieve multiple quotes at once.

Installation

To install quotes-cli, you need Node.js installed on your system. Then, install the package globally using npm:

npm install -g quotes-cli

Usage

After installation, you can use the quotes-cli command in your terminal.

Commands

  • quote | q

    Get a random quote.

    quotes-cli quote
    # or
    quotes-cli q
  • tag | t

    Get a random quote from a specified tag.

    quotes-cli tag love
    # or
    quotes-cli t love
  • search | s

    Get a random quote by searching for an author or book.

    quotes-cli search "Albert Einstein"
    # or
    quotes-cli s "Albert Einstein"
  • bulk | b

    Get multiple quotes at once (maximum of 10).

    quotes-cli bulk 5
    # or
    quotes-cli b 5

Examples

Get a Random Quote

$ quotes-cli quote

Example Output:

           “Be yourself; everyone else is already taken.”   -  Oscar Wilde

Get a Random Quote by Tag

$ quotes-cli tag inspiration

Example Output:

           “The only way to do great work is to love what you do.”   -  Steve Jobs

Search for a Quote by Author or Book

$ quotes-cli search "Mark Twain"

Example Output:

           “The secret of getting ahead is getting started.”   -  Mark Twain

Get Multiple Quotes at Once

$ quotes-cli bulk 3

Example Output:

           “In three words I can sum up everything I've learned about life: it goes on.”   -  Robert Frost

           “If you tell the truth, you don't have to remember anything.”   -  Mark Twain

           “A friend is someone who knows all about you and still loves you.”   -  Elbert Hubbard

Command Help

You can display help information using:

quotes-cli --help

Output:

Usage: quotes-cli [options] [command]

quotes-cli

Options:
  -V, --version        output the version number
  -h, --help           output usage information

Commands:
  quote|q              Get a random quote
  tag|t <name>         Get a random quote from a tag
  search|s <query>     Get a random quote from an author or book
  bulk|b <number>      Get a list of quotes (max 10)

Available Tags

Some example tags you can use with the tag command:

  • love
  • life
  • inspiration
  • humor
  • philosophy
  • truth
  • wisdom
  • poetry
  • romance
  • religion
  • success
  • knowledge
  • motivation
  • friendship
  • happiness

Notes

  • Bulk Command Limit: The bulk command fetches up to 10 quotes at a time.
  • Search Query: When using the search command, you can input any keyword, author name, or book title.
  • Randomness: Quotes are fetched from random pages on Goodreads, providing a wide variety.
  • Internet Connection: An active internet connection is required as quotes are scraped in real-time from Goodreads.

Contributing

Contributions are welcome! If you encounter any issues or have suggestions for improvements, please open an issue or submit a pull request on GitHub.

Disclaimer

This tool scrapes data from Goodreads for personal use. Please ensure you comply with Goodreads' Terms of Service when using this tool.

License

This project is licensed under the MIT License - see the LICENSE file for details.


Enjoy your quotes!